\r
package org.iotivity.service.easysetup.core;\r
\r
+import org.iotivity.base.OcConnectivityType;\r
+\r
/**\r
* It contains configuration details about the connectivity type between the Enrollee device &\r
* Mediator device in order to perform on-boarding.\r
*/\r
public static enum ConnType {\r
// Note : Enum Ids should matched with Native Ids\r
- WiFi(0),\r
- BLE(1);\r
+ WiFi(OcConnectivityType.CT_DEFAULT.getValue()),\r
+ BLE(OcConnectivityType.CT_ADAPTER_GATT_BTLE.getValue());\r
\r
private int mConnType;\r
\r
easySetupManagerNativeInstance.setApplicationContext(mContext);
easySetupManagerNativeInstance.initEasySetup();
Log.d("init", "successful");
- OcConnectivityType ocConnectivityType = OcConnectivityType.CT_ADAPTER_GATT_BTLE;
+
easySetupManagerNativeInstance.provisionEnrollee(connection.getMacaddress(),
wifiProvConfig.getSsId(),
wifiProvConfig.getPassword(),
- ocConnectivityType.getValue());
+ mOnBoardingConfig.getConnType().getValue());
}
{
LOGI("JNI Stop Easy Setup: Entering");
-OCConnectivityType connecitivityType = OCConnectivityType::CT_DEFAULT;
-
-if(jConnectivityType == 0)
-{
-connecitivityType = OCConnectivityType::CT_ADAPTER_IP;
-}
-
-StopProvisioning(connecitivityType);
+StopProvisioning((OCConnectivityType) jConnectivityType);
return;
}