return;
}
- if(ocResource.getHost().contains("coap+tcp")) {
+ if(ocResource.getHost().contains("+tcp")) {
Log.d(TAG, "Recv Found resource event from tcp port," +
"ignoring URI : " + ocResource.getUri());
runOnUiThread(new Runnable() {
Log.d(TAG,"URI of the resource: " + resourceUri);
Log.d(TAG,"Host address of the resource: " + hostAddress);
+ mRemoteEnrollee = mEasySetup.createRemoteEnrollee(ocResource);
+
+ if(mRemoteEnrollee == null) {
+ Log.d(TAG, "Recv Found resource event," +
+ "ignoring URI : " + ocResource.getUri());
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ mDiscoverResource.setEnabled(true);
+ }
+ });
+ return;
+ }
+
+ isFirstTime = false;
+ mEnrolleeDeviceID = ocResource.getServerId();
+
runOnUiThread(new Runnable() {
@Override
public void run() {
mProvisionCloudPropProcess.setEnabled(true);
}
});
- isFirstTime = false;
- mRemoteEnrollee = mEasySetup.createRemoteEnrollee(ocResource);
- mEnrolleeDeviceID = ocResource.getServerId();
}
}
}