try {
FoundResource foundResource = new FoundResource();
OcPlatform.findResource("", OcPlatform.WELL_KNOWN_QUERY,
- OcConnectivityType.CT_ADAPTER_IP, foundResource);
+ OcConnectivityType.CT_DEFAULT, foundResource);
} catch (Exception e) {
Log.e(LOG_TAG, "Exception : " + e);
}
OcPlatform
.findResource(
"", OcPlatform.WELL_KNOWN_QUERY + "?rt=" + "device.smartplug",
- OcConnectivityType.CT_ADAPTER_IP, foundResource);
+ OcConnectivityType.CT_DEFAULT, foundResource);
} catch (OcException e) {
e.printStackTrace();
}
OcPlatform
.findResource(
"", OcPlatform.WELL_KNOWN_QUERY + "?rt=" + "device.notify",
- OcConnectivityType.CT_ADAPTER_IP, foundResource);
+ OcConnectivityType.CT_DEFAULT, foundResource);
} catch (OcException e) {
e.printStackTrace();
}
OcPlatform
.findResource(
"", OcPlatform.WELL_KNOWN_QUERY + "?rt=" + "device.light",
- OcConnectivityType.CT_ADAPTER_IP, foundResource);
+ OcConnectivityType.CT_DEFAULT, foundResource);
} catch (OcException e) {
e.printStackTrace();
}
EntityHandlerNoti entitycb = new EntityHandlerNoti();
resourceHandle = OcPlatform.registerResource("/a/galaxy/gear",
- "device.notify", "oc.mi.def", entitycb,
+ "device.notify", OcPlatform.DEFAULT_INTERFACE, entitycb,
EnumSet.of(ResourceProperty.DISCOVERABLE));
}
else{
System.currentTimeMillis());
PlatformConfig cfg = new PlatformConfig(
- getApplicationContext(),
+ getBaseContext(),
ServiceType.IN_PROC,
ModeType.CLIENT_SERVER,
"0.0.0.0", 0,
.registerResource(
"/a/huebulb",
"device.light",
- "oc.mi.def",
+ OcPlatform.DEFAULT_INTERFACE,
entitycb,
EnumSet.of(ResourceProperty.DISCOVERABLE));
} catch (OcException e) {
.getWeMoDeviceByUDN(udn);
if ((listDevice != null) && (listDevice.isAvailable())) {
PlatformConfig cfg = new PlatformConfig(
- getApplicationContext(),
+ getBaseContext(),
ServiceType.IN_PROC,
ModeType.CLIENT_SERVER, "0.0.0.0", 0,
QualityOfService.LOW);
.registerResource(
"/a/wemo",
"device.smartplug",
- "oc.mi.def",
+ OcPlatform.DEFAULT_INTERFACE,
entitycb,
EnumSet.of(ResourceProperty.DISCOVERABLE));
} catch (OcException e) {