public class ConnectedIotDeviceManager
extends java.lang.Object
implements android.arch.lifecycle.LifecycleObserver
ConnectedIotDeviceManager class collects all of the APIs related to connected IoT
device management. Connected IoT device management includes processes such as sending an invite,
requesting access, delinking an IoT device, and transferring IoT ownership. This manager also
includes processes for getting messages, approving messages, and deleting messages. All of these
methods will be executed on a background thread and return the result on the main thread. To
receive the result, you are expected to pass a corresponding SingleCallback or
CompleteCallback.| Constructor and Description |
|---|
ConnectedIotDeviceManager(android.support.v7.app.AppCompatActivity appCompatActivity)
Constructor for a
ConnectedIotDeviceManager object with the lifecycle set. |
ConnectedIotDeviceManager(android.support.v4.app.Fragment fragment)
Constructor for a
ConnectedIotDeviceManager object with the lifecycle set. |
ConnectedIotDeviceManager(android.arch.lifecycle.Lifecycle lifecycle)
Constructor for a
ConnectedIotDeviceManager object with the lifecycle set. |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptInviteByCode(java.lang.String code,
CompleteCallback callback)
Returns a
CompleteCallback after accepting an invitation for an IoT device for a user
account. |
void |
getMessages(MessageQueryParam messageQueryParam,
SingleCallback<java.util.List<MessageEntity>> callback)
Returns a
List of MessageEntity objects, which contains the message and other
properties related to them. |
void |
rejectInviteByCode(java.lang.String code,
CompleteCallback callback)
Returns a
CompleteCallback after rejecting an invitation for an IoT device for a user
account. |
void |
revokeMessageById(java.lang.String messageId,
CompleteCallback callback)
Returns a
CompleteCallback after revoking access to an IoT device. |
void |
sendInvite(SendInviteParam sendInviteParam,
CompleteCallback callback)
Returns a
CompleteCallback after sending an invitation for access to an IoT device. |
public ConnectedIotDeviceManager(android.arch.lifecycle.Lifecycle lifecycle)
ConnectedIotDeviceManager object with the lifecycle set.lifecycle - See Lifecyclepublic ConnectedIotDeviceManager(android.support.v7.app.AppCompatActivity appCompatActivity)
ConnectedIotDeviceManager object with the lifecycle set.appCompatActivity - See AppCompatActivitypublic ConnectedIotDeviceManager(android.support.v4.app.Fragment fragment)
ConnectedIotDeviceManager object with the lifecycle set.fragment - See Fragmentpublic void acceptInviteByCode(java.lang.String code,
CompleteCallback callback)
CompleteCallback after accepting an invitation for an IoT device for a user
account.code - the code of the messagecallback - the callback to receive the result of accepting an invitation for an IoT
device for a user accountpublic void rejectInviteByCode(java.lang.String code,
CompleteCallback callback)
CompleteCallback after rejecting an invitation for an IoT device for a user
account.code - the code of the messagecallback - the callback to receive the result of rejecting an invitation for an IoT
device for a user accountpublic void getMessages(MessageQueryParam messageQueryParam, SingleCallback<java.util.List<MessageEntity>> callback)
List of MessageEntity objects, which contains the message and other
properties related to them.messageQueryParam - the parameters needed for message retrieval. See
MessageQueryParamcallback - the callback to receive the List of MessageEntity
objectspublic void revokeMessageById(java.lang.String messageId,
CompleteCallback callback)
CompleteCallback after revoking access to an IoT device.messageId - the identification number of the messagecallback - the callback to receive the result of revoking access to an IoT
devicepublic void sendInvite(SendInviteParam sendInviteParam, CompleteCallback callback)
CompleteCallback after sending an invitation for access to an IoT device.sendInviteParam - the parameters needed for sending an invitation. See
SendInviteParamcallback - the callback to receive the result of sending an invitation for access
to an IoT device