ConnectedDevicesPlatform 类
- java.
lang. Object - NativeBase
- com.
microsoft. connecteddevices. ConnectedDevicesPlatform
- com.
public class ConnectedDevicesPlatform
一个类,用于表示连接的设备平台并管理应用与其的连接。
构造函数摘要
构造函数 | 说明 |
---|---|
ConnectedDevicesPlatform(@NonNull Context context) |
创建并初始化此类的新实例。 |
ConnectedDevicesPlatform(@NonNull Context context, @NonNull ConnectedDevicesPlatformSettings settings) |
创建并初始化此类的新实例。 |
方法摘要
修饰符和类型 | 方法和描述 |
---|---|
Connected |
getAccountManager()
获取平台持有的 ConnectedDevicesAccountManager 实例 |
Connected |
getNotificationRegistrationManager() |
Connected |
processNotification(@NonNull Bundle bundle)
处理传入的 GCM 通知 |
Connected |
processNotification(@NonNull Map map)
处理传入的 FCM 通知 |
Async |
processNotificationAsync(@NonNull ConnectedDevicesNotification notification)
处理传入通知。 如果通知不是 ConnectedDevicesPlatform,则返回的 AsyncOperation 将以异步方式尽快完成。 |
Async |
shutdownAsync()
关闭连接的设备平台。 |
void |
start()
启动平台 |
构造函数详细信息
ConnectedDevicesPlatform
public ConnectedDevicesPlatform(@NonNull Context context)
创建并初始化此类的新实例。
参数:
ConnectedDevicesPlatform
public ConnectedDevicesPlatform(@NonNull Context context, @NonNull ConnectedDevicesPlatformSettings settings)
创建并初始化此类的新实例。
参数:
方法详细信息
getAccountManager
public ConnectedDevicesAccountManager getAccountManager()
获取平台持有的 ConnectedDevicesAccountManager 实例
返回:
getNotificationRegistrationManager
public ConnectedDevicesNotificationRegistrationManager getNotificationRegistrationManager()
获取平台持有的 ConnectedDevicesNotificationRegistrationManager 实例
返回:
processNotification
public ConnectedDevicesProcessNotificationOperation processNotification(@NonNull Bundle bundle)
处理传入的 GCM 通知
参数:
返回:
processNotification
public ConnectedDevicesProcessNotificationOperation processNotification(@NonNull Map map)
处理传入的 FCM 通知
参数:
返回:
processNotificationAsync
public AsyncOperation
处理传入通知。 如果通知不是 ConnectedDevicesPlatform,则返回的 AsyncOperation 将以异步方式尽快完成。
参数:
返回:
shutdownAsync
start
public void start()
启动平台