| CLASS info |
| public final class StatusCode |
| Nearby operation的状态码 |
| Return type | Method name |
| String | getStatusCode(int statusCode) 基于给定的状态码返回字符串 |
| Constant |
| public static final int STATUS_SUCCESS |
| 操作成功。 Constant Value:0 |
| Constant |
| public static final int STATUS_FAILURE |
| 操作失败。 Constant Value:-1 |
| Constant |
| public static final int STATUS_API_DISORDER |
| API方法调用乱序。 Constant Value:8001 |
| Constant |
| public static final int STATUS_NO_NETWORK |
| 没有连接网络(Wi-Fi/Ethernet)。 Constant Value:8002 |
| Constant |
| public static final int STATUS_NOT_CONNECTED |
| 没有连接到远端Endpoint,不能发送数据。 Constant Value:8003 |
| Constant |
| public static final int STATUS_TRANSFER_IO_ERROR |
| 文件或流数据,读取或者写入失败。 Constant Value:8004 |
| Constant |
| public static final int STATUS_ALREADY_BROADCASTING |
| 服务已经开始广播,请在下一次广播之前,先做停止广播操作。 Constant Value:8005 |
| Constant |
| public static final int STATUS_ALREADY_CONNECTED |
| 已经和远端设备相连,不允许对同一个远端设备进行多次连接。 Constant Value:8006 |
| Constant |
| public static final int STATUS_ALREADY_SCANNING |
| 扫描服务已经开始,请在下一次扫描前先做停止扫描操作。 Constant Value:8007 |
| Constant |
| public static final int STATUS_POLICY_CONFLICT |
| 在已经启动的扫描和连接中已经有具体的策略,请在使用新的策略之前,停止当前的扫描和连接。 Constant Value:8008 |
| Constant |
| public static final int STATUS_BLUETOOTH_OPERATION_FAILED |
| 由于蓝牙的问题导致连接失败。 Constant Value:8009 |
| Constant |
| public static final int STATUS_CONNECT_REJECTED |
| 远端设备拒绝连接。 Constant Value:8010 |
| Constant |
| public static final int STATUS_CONNECT_IO_ERROR |
| 与远端设备进行通信时失败。如果这种错误经常出现,请做断开连接操作然后再做重新连接操作。 Constant Value:8011 |
| Constant |
| public static final int STATUS_ENDPOINT_UNKNOWN |
| 尝试与未知的endpoint进行连接。这个endpoint尚未被发现,也没有与别的设备建立连接。 Constant Value:8012 |
| Constant |
| public static final int STATUS_API_OCCUPIED |
| 应用接口已经被其他app使用。当前不可获取。 Constant Value:8013 |
| Constant |
| public static final int STATUS_MISSING_PERMISSION_ACCESS_COARSE_LOCATION |
| 没有ACCESS_COARSE_LOCATION权限。 Constant Value:8014 |
| Constant |
| public static final int STATUS_MISSING_PERMISSION_ACCESS_WIFI_STATE |
| 没有ACCESS_WIFI_STATE权限。 Constant Value:8015 |
| Constant |
| public static final int STATUS_MISSING_PERMISSION_BLUETOOTH |
| 没有BLUETOOTH权限。 Constant Value:8016 |
| Constant |
| public static final int STATUS_MISSING_PERMISSION_BLUETOOTH_ADMIN |
| 没有BLUETOOTH_ADMIN权限。 Constant Value:8017 |
| Constant |
| public static final int STATUS_MISSING_PERMISSION_CHANGE_WIFI_STATE |
| 没有CHANGE_WIFI_STATE权限。 Constant Value:8018 |
| Constant |
| public static final int STATUS_MISSING_PERMISSION_RECORD_AUDIO |
| 没有RECORD_AUDIO权限。 Constant Value:8019 |
| Constant |
| public static final int STATUS_MISSING_SETTING_LOCATION_ON |
| 没有打开位置权限开关。 Constant Value:8020 |
public static final int STATUS_AIRPLANE_MODE_MUST_BE_OFF
处于飞行模式中,无法使用功能。
Constant Value:8021
| Constant |
| public static final int STATUS_MESSAGE_APP_UNREGISTERED |
| 用户没有许可使用Message API的权限。 Constant Value:8050 |
| Constant |
| public static final int STATUS_MESSAGE_APP_QUOTA_LIMITED |
| 应用使用Nearby Messages API的配额已达上限。可以通过开发者控制面请求更多配额。 Constant Value:8051 |
| Constant |
| public static final int STATUS_MESSAGE_BLE_BROADCASTING_UNSUPPORTED |
| Message API操作依赖于BLE广播,但是当前不支持此功能。 Constant Value:8052 |
| Constant |
| public static final int STATUS_MESSAGE_BLE_SCANNING_UNSUPPORTED |
| Message API操作依赖于BLE扫描,但是当前不支持此功能。 Constant Value:8053 |
| Constant |
| public static final int STATUS_MESSAGE_BLUETOOTH_OFF |
| 使用Message API需要蓝牙功能,但蓝牙处于关闭状态。 Constant Value:8054 |
| Constant |
| public static final int STATUS_MESSAGE_WRONG_CONTEXT |
| Message API无效的全局信息。 Constant Value:8055 |
| Constant |
| public static final int STATUS_MESSAGE_NOT_ALLOW |
| Message API被禁止。 Constant Value:8056 |
| Constant |
| public static final int STATUS_MESSAGE_MISSING_PERMISSIONS |
| Message API因缺失权限被拒绝。 Constant Value:8057 |
| Constant |
| public static final int STATUS_MESSAGE_AUTH_FAILED |
| Message API没有被授权。 Constant Value:8058 |
| Constant |
| public static final int STATUS_MESSAGE_PENDING_INTENTS_LIMITED |
| 应用发起了超过PendingIntent消息订阅限额,在添加新的请求前需要先删除老的请求。 Constant Value:8059 |
| Method |
| public static String getStatusCode(int statusCode) |
| 基于给定的状态码返回字符串。 |
Parameters
| Parameter name | Parameter desc |
| statusCode | 状态码 |