Unbinding a Device
API Function
This API is used to register the broadcast for receiving the command used to unbind a directly connected device from the IoT platform. After this broadcast is received, developers must delete the configuration information about the directly connected device and release all resources. When the device restarts, developers must bind the device to the IoT platform again.
API Description
1 |
HubService.TOPIC_UNBINDDEVICE;
|
Class
HubService
Example
1 2 3 4 5 6 7 8 9 10 11 |
BroadcastReceiver mUnbindRsp;
mUnbindRsp = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
//Delete config file, free resource
return;
}
};
mLocalBroadcastManager = LocalBroadcastManager.getInstance(this);
IntentFilter filterUnbind = new IntentFilter(HubService.TOPIC_UNBINDDEVICE);
mLocalBroadcastManager.registerReceiver(mUnbindRsp, filterUnbind);
|
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot