+/**\r
+ * ***************************************************************\r
+ * <p/>\r
+ * Copyright 2015 Samsung Electronics All Rights Reserved.\r
+ * <p/>\r
+ * <p/>\r
+ * <p/>\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * <p/>\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ * <p/>\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * <p/>\r
+ * ****************************************************************\r
+ */\r
+\r
package org.iotivity.service.easysetup;\r
\r
import java.io.IOException;\r
import org.iotivity.service.easysetup.core.EnrolleeDevice;\r
import org.iotivity.service.easysetup.core.EnrolleeState;\r
import org.iotivity.service.easysetup.impl.EnrolleeDeviceFactory;\r
-import org.iotivity.service.easysetup.impl.EnrolleeDeviceWiFiOnboarding;\r
import org.iotivity.service.easysetup.impl.WiFiOnBoardingConfig;\r
import org.iotivity.service.easysetup.impl.WiFiProvConfig;\r
-import org.iotivity.service.easysetup.mediator.EnrolleeInfo;\r
import org.iotivity.service.easysetup.mediator.ProvisionEnrollee;\r
\r
import android.app.Activity;\r
import android.graphics.Bitmap;\r
import android.net.wifi.WifiConfiguration;\r
import android.os.Bundle;\r
-import android.view.Menu;\r
import android.view.View;\r
import android.view.View.OnClickListener;\r
import android.widget.Button;\r
\r
textView1 = (TextView) findViewById(R.id.textView1);\r
\r
- // Provisioning Process\r
+ // Provisioning Process - This instantiation will be removed in the next version\r
provisionEnrolleInstance = new ProvisionEnrollee(this);\r
-\r
/* Invocation of APIs using the Easy Setup SDK APIs */\r
\r
/* Create Easy Setup Service instance*/\r
- mEasySetupService = EasySetupService.getInstance(getApplicationContext(), new EasySetupStatus() {\r
+ mEasySetupService = EasySetupService.getInstance(getApplicationContext(),\r
+ new EasySetupStatus() {\r
\r
- @Override\r
- public void onFinished(EnrolleeDevice enrolledevice) {\r
- final String msg = enrolledevice.isSetupSuccessful() ? "Device configured successfully" : "Device configuration failed";\r
- runOnUiThread(new Runnable() {\r
@Override\r
- public void run() {\r
- Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\r
+ public void onFinished(EnrolleeDevice enrolledevice) {\r
+ final String msg = enrolledevice.isSetupSuccessful() ?\r
+ "Device configured successfully" : "Device configuration failed";\r
+ runOnUiThread(new Runnable() {\r
+ @Override\r
+ public void run() {\r
+ Toast.makeText(getApplicationContext(),\r
+ msg, Toast.LENGTH_SHORT).show();\r
+ }\r
+ });\r
}\r
- });\r
- }\r
\r
- @Override\r
- public void onProgress(EnrolleeState state) {\r
- runOnUiThread(new Runnable() {\r
@Override\r
- public void run() {\r
- Toast.makeText(getApplicationContext(), "Device state changed", Toast.LENGTH_SHORT).show();\r
+ public void onProgress(EnrolleeState state) {\r
+ runOnUiThread(new Runnable() {\r
+ @Override\r
+ public void run() {\r
+ Toast.makeText(getApplicationContext(),\r
+ "Device state changed", Toast.LENGTH_SHORT).show();\r
+ }\r
+ });\r
}\r
- });\r
- }\r
\r
- });\r
+ });\r
\r
/* Create EnrolleeDevice Factory instance*/\r
mDeviceFactory = EnrolleeDeviceFactory.newInstance(getApplicationContext());\r
\r
/* Create a device using Factory instance*/\r
- mDevice = mDeviceFactory.newEnrolleeDevice(getOnBoardingWifiConfig(), getEnrollerWifiConfig());\r
+ mDevice = mDeviceFactory.newEnrolleeDevice(getOnBoardingWifiConfig(),\r
+ getEnrollerWifiConfig());\r
\r
addListenerForStartAP();\r
addListenerForStopAP();\r
+/**
+ * ***************************************************************
+ * <p>
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * <p>
+ * <p>
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p>
+ * ****************************************************************
+ */
package org.iotivity.service.easysetup.core;
public interface ConnectionInterface {
+/**
+ * ***************************************************************
+ * <p>
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * <p>
+ * <p>
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p>
+ * ****************************************************************
+ */
+
package org.iotivity.service.easysetup.core;
import android.content.Context;
-import android.util.Log;
import org.iotivity.service.easysetup.impl.EnrolleeDeviceFactory;
* This is facade class, a single point of contact for Application.
* It contains set of APIs to do easy setup of the enrolling device.
* ON-BOARDING - This is a step to establish connectivity between the device & Mediator device.
- * PROVISION - This is a step where the netowork's detail & credentials are given to the enrolling device.
+ * PROVISION - This is a step where the netowork's detail & credentials are given to the
+ * enrolling device.
*/
public class EasySetupService {
/**
* Gives a singleton instance of Easy setup service.
*
- * @param callback Application needs to provide this callback to receive the status of of easy setup process.
+ * @param callback Application needs to provide this callback to receive the status of easy
+ * setup process.
*/
- public synchronized static EasySetupService getInstance(Context context, EasySetupStatus callback) {
+ public synchronized static EasySetupService getInstance(Context context, EasySetupStatus
+ callback) {
if (sInstance == null) {
sInstance = new EasySetupService(callback);
mContext = context;
+/**
+ * ***************************************************************
+ * <p>
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * <p>
+ * <p>
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p>
+ * ****************************************************************
+ */
+
package org.iotivity.service.easysetup.core;
/**
+/**
+ * ***************************************************************
+ * <p>
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * <p>
+ * <p>
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p>
+ * ****************************************************************
+ */
+
package org.iotivity.service.easysetup.core;
/**
- * This is an abstract class represents the device being provisioned into the network. The device being enrolled or provisioned into the network is called Enrollee.
- * Application has to extend this class and provide implementation of abstract methods according to the ON-BOARDING & PROVISION connectivity i.e. WiFi, BLE, BT etc. the device is having.
+ * This is an abstract class represents the device being provisioned into the network. The
+ * device being enrolled or provisioned into the network is called Enrollee.
+ * Application has to extend this class and provide implementation of abstract methods according
+ * to the ON-BOARDING & PROVISION connectivity i.e. WiFi, BLE, BT etc. the device is having.
*/
public abstract class EnrolleeDevice {
protected ProvisioningCallback mProvisioningCallback;
/**
- * @param onBoardingConfig Contains details about the connectivity to be established between the Enrollee device & Mediator device in order to perform on-boarding
- * @param provConfig Contains details about the network to which Enrollee device is going to connect.
+ * @param onBoardingConfig Contains details about the connectivity to be established between
+ * the Enrollee device & Mediator device in order to perform
+ * on-boarding
+ * @param provConfig Contains details about the network to which Enrollee device is
+ * going to connect.
*/
protected EnrolleeDevice(OnBoardingConfig onBoardingConfig, ProvisioningConfig provConfig) {
mProvConfig = provConfig;
}
/**
- * Application has to implement it according to the on boarding connectivity the device is having.
+ * Application has to implement it according to the on boarding connectivity the device is
+ * having.
* This method will be called back during the easy setup process.
*/
protected abstract void startOnBoardingProcess();
protected abstract void stopOnBoardingProcess();
/**
- * Application has to implement it according to the type of the network device is going to connect or provisioned.
+ * Application has to implement it according to the type of the network device is going to
+ * connect or provisioned.
* This method will be called back once on-boarding of the device is successful.
*
- * @param conn Contains detail about the network established between the Enrollee device & Mediator device. Its implementation vary according to the connectivity type.
+ * @param conn Contains detail about the network established between the Enrollee device &
+ * Mediator device. Its implementation vary according to the connectivity type.
*/
protected abstract void startProvisioningProcess(ConnectionInterface conn);
/**
- * Once on boarding is successful concrete Enrollee class would call this method and set the Connection.
+ * Once on boarding is successful concrete Enrollee class would call this method and set the
+ * Connection.
*
* @param conn Connectivity between Enrollee device & Mediator device.
*/
+/**
+ * ***************************************************************
+ * <p>
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * <p>
+ * <p>
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p>
+ * ****************************************************************
+ */
+
package org.iotivity.service.easysetup.core;
/**
-package org.iotivity.service.easysetup.core;
+/**
+ * ***************************************************************
+ * <p>
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * <p>
+ * <p>
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p>
+ * ****************************************************************
+ */
+package org.iotivity.service.easysetup.core;
/**
* It defines various states of the Enrollee device during easy setup process
+/**
+ * ***************************************************************
+ * <p>
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * <p>
+ * <p>
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p>
+ * ****************************************************************
+ */
+
package org.iotivity.service.easysetup.core;
public class IpConnection implements ConnectionInterface {
@Override
public String getDesc() {
- // TODO Auto-generated method stub
return "Description";
}
@Override
public boolean isConnected() {
- // TODO Auto-generated method stub
return mIsConnected;
}
@Override
public Object getConnection() {
- // TODO Auto-generated method stub
return this;
}
+/**
+ * ***************************************************************
+ * <p>
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * <p>
+ * <p>
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p>
+ * ****************************************************************
+ */
+
package org.iotivity.service.easysetup.core;
public abstract class OnBoardingCallback {
+/**
+ * ***************************************************************
+ * <p>
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * <p>
+ * <p>
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p>
+ * ****************************************************************
+ */
+
package org.iotivity.service.easysetup.core;
/**
- * It contains configuration details about the connectivity type between the Enrollee device & Mediator device in order to perform on-boarding.
+ * It contains configuration details about the connectivity type between the Enrollee device &
+ * Mediator device in order to perform on-boarding.
*/
public interface OnBoardingConfig {
+/**
+ * ***************************************************************
+ * <p>
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * <p>
+ * <p>
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p>
+ * ****************************************************************
+ */
+
package org.iotivity.service.easysetup.core;
public abstract class ProvisioningCallback {
-package org.iotivity.service.easysetup.core;
+/**
+ * ***************************************************************
+ * <p>
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * <p>
+ * <p>
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p>
+ * ****************************************************************
+ */
+package org.iotivity.service.easysetup.core;
/**
- * It contains configuration details about the the target network where Enrollee device is going to be enrolled.
+ * It contains configuration details about the the target network where Enrollee device is
+ * going to be enrolled.
*/
public interface ProvisioningConfig {
}
/**
- * Gives the instance of the configuration object created according to the connectivity type of target network.
+ * Gives the instance of the configuration object created according to the connectivity
+ * type of target network.
*
* @return instance object of configuration according to connectivity type of target network
*/
+/**
+ * ***************************************************************
+ * <p>
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * <p>
+ * <p>
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p>
+ * ****************************************************************
+ */
+
package org.iotivity.service.easysetup.impl;
import org.iotivity.service.easysetup.core.EnrolleeDevice;
+/**
+ * ***************************************************************
+ * <p>
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * <p>
+ * <p>
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p>
+ * ****************************************************************
+ */
+
package org.iotivity.service.easysetup.impl;
import java.util.Timer;
finalResult = "Device OnBoarded" + "["
+ enrolleStatus.getIpAddr() + "]";
- /*
- * easySetupInstance.StartEasySetup(enrolleStatus.getIpAddr()) ;
- * easySetupCount++; Log.i("EasyConnect",
- * "easy Setup Count-"+easySetupCount); Log.i("EasyConnect",
- * "IP Address-"+enrolleStatus.getIpAddr());
- */
connectedDevice = enrolleStatus;
IpConnection conn = new IpConnection();
conn.setConnectivity(true);
return;
}
-
-/* textView1.setText("");
- textView1.append("Clients: \n");
- textView1.append("####################\n");
- textView1.append("IP Address : " + enrolleStatus.getIpAddr()
- + "\n");
- textView1.append("Device : " + enrolleStatus.getDevice() + "\n");
- textView1.append("HW Address : " + enrolleStatus.getHWAddr()
- + "\n");
- textView1.append("Is OnBoarded : " + enrolleStatus.isReachable()
- + "\n");
-
- Toast.makeText(getApplicationContext(), finalResult,
- Toast.LENGTH_LONG).show();*/
-
-
}
IpConnection conn = new IpConnection();
@Override
protected void startOnBoardingProcess() {
- // TODO Auto-generated method stub
-
- //2. Get call back once enrolling device connect to the Soft AP
- //3. fetch the IP assigned to enrolling device
- //4. Call below steps
-
Log.i(TAG, "Starging on boarding process");
//1. Create Soft AP
Log.i(TAG, "Soft AP is created with status " + status);
-
Timer myTimer;
myTimer = new Timer();
myTimer.schedule(new TimerTask() {
}
}, 0, 5000);
-
-
}
protected void stopOnBoardingProcess() {
+/**
+ * ***************************************************************
+ * <p>
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * <p>
+ * <p>
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p>
+ * ****************************************************************
+ */
+
package org.iotivity.service.easysetup.impl;
-import org.iotivity.service.easysetup.core.ConnectionInterface;
import org.iotivity.service.easysetup.core.IpConnection;
import org.iotivity.service.easysetup.core.OnBoardingConfig;
@Override
public Object getConfig() {
- // TODO Auto-generated method stub
return config;
}
@Override
public ConnType getConnType() {
- // TODO Auto-generated method stub
return mConnType;
}
-
-/* @Override
- public OnBoardingConnection getConnection() {
- // TODO Auto-generated method stub
- return mConnection;
- }
-
- @Override
- public void setConnection(OnBoardingConnection conn) {
- mConnection = (IpConnection)conn;
- }*/
-
-
}
+/**
+ * ***************************************************************
+ * <p>
+ * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * <p>
+ * <p>
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p>
+ * ****************************************************************
+ */
+
package org.iotivity.service.easysetup.impl;
import org.iotivity.service.easysetup.core.ProvisioningConfig;
@Override
public ConnType getConnType() {
- // TODO Auto-generated method stub
return mConnType;
}
/**\r
* ***************************************************************\r
- * <p/>\r
+ * <p>\r
* Copyright 2015 Samsung Electronics All Rights Reserved.\r
- * <p/>\r
- * <p/>\r
- * <p/>\r
+ * <p>\r
+ * <p>\r
+ * <p>\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
* You may obtain a copy of the License at\r
- * <p/>\r
+ * <p>\r
* http://www.apache.org/licenses/LICENSE-2.0\r
- * <p/>\r
+ * <p>\r
* Unless required by applicable law or agreed to in writing, software\r
* distributed under the License is distributed on an "AS IS" BASIS,\r
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
* See the License for the specific language governing permissions and\r
* limitations under the License.\r
- * <p/>\r
+ * <p>\r
* ****************************************************************\r
*/\r
package org.iotivity.service.easysetup.mediator;\r
}\r
\r
public void ProvisioningStatusCallBack(int statuscode) {\r
- // TODO Auto-generated method stub\r
Log.d(TAG,\r
"onFinishProvisioning() inside Android Java application. statuscode - "\r
+ statuscode);\r
/**\r
* ***************************************************************\r
- * <p/>\r
+ * <p>\r
* Copyright 2015 Samsung Electronics All Rights Reserved.\r
- * <p/>\r
- * <p/>\r
- * <p/>\r
+ * <p>\r
+ * <p>\r
+ * <p>\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
* You may obtain a copy of the License at\r
- * <p/>\r
+ * <p>\r
* http://www.apache.org/licenses/LICENSE-2.0\r
- * <p/>\r
+ * <p>\r
* Unless required by applicable law or agreed to in writing, software\r
* distributed under the License is distributed on an "AS IS" BASIS,\r
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
* See the License for the specific language governing permissions and\r
* limitations under the License.\r
- * <p/>\r
+ * <p>\r
* ****************************************************************\r
*/\r
package org.iotivity.service.easysetup.mediator;\r
/**
* ***************************************************************
- * <p/>
+ * <p>
* Copyright 2015 Samsung Electronics All Rights Reserved.
- * <p/>
- * <p/>
- * <p/>
+ * <p>
+ * <p>
+ * <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- * <p/>
+ * <p>
* http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ * <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- * <p/>
+ * <p>
* ****************************************************************
*/
/**
* ***************************************************************
- * <p/>
+ * <p>
* Copyright 2015 Samsung Electronics All Rights Reserved.
- * <p/>
- * <p/>
- * <p/>
+ * <p>
+ * <p>
+ * <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- * <p/>
+ * <p>
* http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ * <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- * <p/>
+ * <p>
* ****************************************************************
*/
package org.iotivity.service.easysetup.mediator;
/**
* ***************************************************************
- * <p/>
+ * <p>
* Copyright 2015 Samsung Electronics All Rights Reserved.
- * <p/>
- * <p/>
- * <p/>
+ * <p>
+ * <p>
+ * <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- * <p/>
+ * <p>
* http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ * <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- * <p/>
+ * <p>
* ****************************************************************
*/
package org.iotivity.service.easysetup.mediator;
* Interface called when the scan method finishes. Network operations should
* not execute on UI thread
*
- * @param clients
- * of {@link EnrolleeInfo}
+ * @param clients of {@link EnrolleeInfo}
*/
public void deviceOnBoardingStatus(EnrolleeInfo clients);
/**\r
* ***************************************************************\r
- * <p/>\r
+ * <p>\r
* Copyright 2015 Samsung Electronics All Rights Reserved.\r
- * <p/>\r
- * <p/>\r
- * <p/>\r
+ * <p>\r
+ * <p>\r
+ * <p>\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
* You may obtain a copy of the License at\r
- * <p/>\r
+ * <p>\r
* http://www.apache.org/licenses/LICENSE-2.0\r
- * <p/>\r
+ * <p>\r
* Unless required by applicable law or agreed to in writing, software\r
* distributed under the License is distributed on an "AS IS" BASIS,\r
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
* See the License for the specific language governing permissions and\r
* limitations under the License.\r
- * <p/>\r
+ * <p>\r
* ****************************************************************\r
*/\r
package org.iotivity.service.easysetup.mediator;\r
/**\r
* ***************************************************************\r
- * <p/>\r
+ * <p>\r
* Copyright 2015 Samsung Electronics All Rights Reserved.\r
- * <p/>\r
- * <p/>\r
- * <p/>\r
+ * <p>\r
+ * <p>\r
+ * <p>\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
* You may obtain a copy of the License at\r
- * <p/>\r
+ * <p>\r
* http://www.apache.org/licenses/LICENSE-2.0\r
- * <p/>\r
+ * <p>\r
* Unless required by applicable law or agreed to in writing, software\r
* distributed under the License is distributed on an "AS IS" BASIS,\r
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
* See the License for the specific language governing permissions and\r
* limitations under the License.\r
- * <p/>\r
+ * <p>\r
* ****************************************************************\r
*/\r
package org.iotivity.service.easysetup.mediator;\r
import android.content.Context;\r
import android.net.wifi.WifiConfiguration;\r
\r
-import org.iotivity.service.easysetup.mediator.ip.WiFiSoftAPManager;\r
\r
-import android.widget.Toast;\r
+import org.iotivity.service.easysetup.mediator.ip.WiFiSoftAPManager;\r
\r
public class OnBoardEnrollee {\r
WiFiSoftAPManager wifiSoftAPManager;\r
+/**\r
+ * ***************************************************************\r
+ * <p>\r
+ * Copyright 2015 Samsung Electronics All Rights Reserved.\r
+ * <p>\r
+ * <p>\r
+ * <p>\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * <p>\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ * <p>\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * <p>\r
+ * ****************************************************************\r
+ */\r
+\r
package org.iotivity.service.easysetup.mediator;\r
\r
import android.content.Context;\r
}\r
\r
public void ProvisioningStatusCallBack(int statuscode) {\r
- // TODO Auto-generated method stub\r
Log.d(TAG,\r
"onFinishProvisioning() inside Android Java application. statuscode - "\r
+ statuscode);\r
/**
* ***************************************************************
- * <p/>
+ * <p>
* Copyright 2015 Samsung Electronics All Rights Reserved.
- * <p/>
- * <p/>
- * <p/>
+ * <p>
+ * <p>
+ * <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- * <p/>
+ * <p>
* http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ * <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- * <p/>
+ * <p>
* ****************************************************************
*/
+
package org.iotivity.service.easysetup.mediator.ip;
import java.io.BufferedReader;
* Note: Starting Wi-Fi Soft Access Point will disable the Wi-Fi normal operation.
* </p>
*
- * @param wifiConfig
- * SSID, security and channel details as part of WifiConfiguration
+ * @param wifiConfig SSID, security and channel details as part of WifiConfiguration
* @return {@code true} if the operation succeeds, {@code false} otherwise
*/
public boolean setWifiApEnabled(WifiConfiguration wifiConfig,
/**
* Gets a list of the Soft AP clients connected to the Wi-Fi Soft Access point
*
- * @param finishListener
- * Interface called when the scan method finishes
- * @param reachableTimeout
- * Reachable Timeout in miliseconds
+ * @param finishListener Interface called when the scan method finishes
+ * @param reachableTimeout Reachable Timeout in miliseconds
*/
public void getClientList(IOnBoardingStatus finishListener, final int reachableTimeout) {
this.finishListener = finishListener;