> For the complete documentation index, see [llms.txt](https://developers-apps-in-toss.toss.im/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-zh/sdk/domains-api/device.md).

# 设备

提供设备的区域设置·OS、相册·相机·联系人·位置、触觉反馈、打开 URL 功能。

### API 列表

| API                        | 说明                       | 详情                                                                                                                                           |
| -------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `Device.locale`            | 用户区域设置信息                 | [locale](https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-zh/sdk/domains-api/device/device.locale.md)                       |
| `Device.os`                | 当前平台(`ios`/`android`) 信息 | [os](https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-zh/sdk/domains-api/device/device.os.md)                               |
| `Device.getPhotos`         | 从相册中加载照片列表               | [getPhotos](https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-zh/sdk/domains-api/device/device.getphotos.md)                 |
| `Device.getContacts`       | 按页获取联系人列表                | [getContacts](https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-zh/sdk/domains-api/device/device.getcontacts.md)             |
| `Device.getLocation`       | 获取设备的当前位置                | [getLocation](https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-zh/sdk/domains-api/device/device.getlocation.md)             |
| `Device.openCamera`        | 启动相机并返回拍摄的图像             | [openCamera](https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-zh/sdk/domains-api/device/device.opencamera.md)               |
| `Device.getAlbumItems`     | 从相册中选择照片·视频并获取           | [getAlbumItems](https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-zh/sdk/domains-api/device/device.getalbumitems.md)         |
| `Device.triggerHaptic`     | 在设备上触发触觉振动               | [triggerHaptic](https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-zh/sdk/domains-api/device/device.triggerhaptic.md)         |
| `Device.subscribeLocation` | 持续监测位置变化并执行回调            | [subscribeLocation](https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-zh/sdk/domains-api/device/device.subscribelocation.md) |
| `Device.openURL`           | 在设备的默认浏览器或相关应用中打开指定的 URL | [openURL](https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-zh/sdk/domains-api/device/device.openurl.md)                     |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers-apps-in-toss.toss.im/documentation/api-and-sdk-zh/sdk/domains-api/device.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
