If you do not have an Android device to try out WSO2 IoT Server, follow this tutorial and enroll an Android Virtual Device (AVD) with WSO2 IoT Server.
Tip | ||
---|---|---|
| ||
|
Let's get started!
Sign in to the Device Management console.
Expand title Click here for more information. Insert excerpt Accessing the WSO2 IoT Server Consoles Accessing the WSO2 IoT Server Consoles - Click Add under DEVICES.
- Click to try out the virtual Android device.
- Click Download the virtual Android device.
Unzip the downloaded android-tryIt.ZIP file.
Run the startEmulator script on your terminal.
Localtabgroup Localtab active true title Linux/Mac Code Block cd <ANDROID_TRY_IT> ./startEmulator.sh
Localtab title Windows Code Block cd <ANDROID_TRY_IT> startEmulator.bat
Install the Android SDK on your computer by entering
n
when prompted.Code Block Do you have an Android SDK installed on your computer (y/n) ? :
Note If you have an Android SDK already installed on your computer, enter
y
, and provide its location when prompted.Create the AVD by entering
y
when prompted.Code Block Do you want to create WSO2_AVD with default configs (y/n)?:
Next, the system prompts to create a custom hardware profile by requesting for device specific details. You can enter
no
as the response and skip this step.Code Block Do you wish to create a custom hardware profile [no]
If you have multiple AVDs, enter WSO2_AVD to continue with the tutorial.
Code Block Enter AVD number to start (eg: 1) :
Note If you only have the
WSO2_AVD
on your computer, it starts automatically.If you are running the script on a Mac or Windows OS, the system prompts to install the Hardware Accelerated Execution Manager (HAXM) to get the Android emulator running. Enter the
password
and proceed with the installation.Code Block Installing intel HAXM, Please wait ... Password:
Note If you are running the AVD for the first time, it takes a couple of minutes for the virtual device to start up and complete the agent installation process.
Once the installation is complete, the system prompts you to restart your computer, and run the emulator.
Code Block Silent installation Pass! Please restart your machine and run again.
Note If you restart your computer as part of the HAXM installation process, make sure to start the WSO2 IoT Server core profile before running the emulator.
Code Block cd <IoT_HOME>/bin sh iot-server.sh
After running the emulator, tap SKIP AND GO TO ENROLLMENT, which will direct you to install the device with WSO2 IoT Server in the default manner.
Info In WSO2 IoT Server, data containerization is implemented using the Managed Profile feature. For more information on how to set up the Work-Profile , see Setting Up the Work Profile .
Enter the server IP and the port as your server address in the text box provided and tap START REGISTRATION.
Example: Register the device via HTTP: 10.100.7.35:8280
Type your details and tap SIGN IN. A confirmation message appears.
Tip Unsure of what to enter? Check out the details provided under step 2 of the virtual Android device's try it out page or follow the steps given below.
Expand title Example: Organization: This field is optional. You need to enter organization name only if you are running in a multi-tenant environment.
Info If you are not running in a multi-tenant environment, the default organization name is carbon.super. But you can choose to keep this field blank too.
- Username: Your WSO2 IoT Server username.
- Password: Your WSO2 IoT Server password.
- Read the policy agreement, and tap AGREE to accept the agreement.
- Tap ACTIVATE to enable the WSO2 agent administrator on your device. A confirmation message appears after enabling the device admin.
Tap ALLOWto allow the WSO2 Android agent to make and manage phone calls, to access photos, media, files, and the device location.
Set a PIN code of your choice with a minimum of 4 digits and tap SET PIN CODE. The PIN code is used to secure your personal data. Thereby, the WSO2 IoT Server is not able to carry out critical operations on your personal data without using this PIN.
Example: If the device management admin needs to wipe your device or remove data from the device, he/she cannot directly wipe it without the PIN code. You have to provide the PIN code to get your device wiped or you can log into the device management console and wipe your device by entering the PIN code. A confirmation message appears.You have now successfully registered your Android device. Tap Device Information to get device specific information, and tap Unregister if you wish to unregister your device from WSO2 IoT Server.
- Navigate to the device management console and click View under devices to confirm that your device is registered.
Click the device and navigate to the DEVICE DETAILS page.
Check out the following features available on the DEVICE DETAILS page:
Device Details: The top-left section of the DEVICE DETAILS page displays the following device information that are automatically retrieved when you register the device with WSO2 IoT Server.
Information Description Device owner and device name Indicates the name of the device owner and the name given by the device owner to the device (e.g. Admin's Android Virtual Device). You can edit the device name via the DEVICES page. Model The type of the device. Ownership Indicates the device ownership as either BYOD or COPE. Status Indicates whether the device is active, inactive or removed from WSO2 IoT Server. Battery level Indicates the battery level of the device. RAM usage Indicates the RAM usage of the device as a percentage. Local storage Indicates the device memory consumption. External storage Indicates the external memory consumption.
Device Operations: The following operations are supported for Android in WSO2 IoT Server:
Operation Purpose Ring Ring the device via WSO2 IoT Server. (e.g., If you click the Ring operation, the virtual device starts ringing and a notification gets displayed. To stop the ringing tap OK on the notification.) This is useful to locate a misplaced device. Device Lock Lock the device via WSO2 IoT Server. This is useful when a device gets lost or stolen. Location Retrieve the device location. Clear Password Remove a device lock. Reboot Reboot or restart the device. By default, this is operation is inactive for AVD. Upgrade Firmware Upgrade device firmware to a newer version over-the-air (OTA). By default, this operation is inactive for AVD. Mute Enable the silent profile of the device. Message Send a message to the device via WSO2 IoT Server. Device admins can use this device operation to send private and group messages device owners. Change Lock-code Change the passcode or lock code of the device. Enterprise Wipe Unregister the device from WSO2 IoT Server. Wipe Data Carry out a factory reset on the device. To perform this operation, the user must provide the PIN specified during the device registration.
- Operations Log: This section lists the operations that have been performed on the device and their statuses:
IN-PROGRESS
: The operation processing at the WSO2 IoT Server side is in-progress and has not yet been delivered to the device.PENDING
: WSO2 Iot Server has delivered an operation to the device and is waiting for a response from the device.COMPLETED
: WSO2 IoT Server has received a response from the device, for an operation.ERROR
: An error has occurred while carrying out the operation.
Info The operations log gets updated at regular intervals through a polling mechanism. Click on the Refresh Log button to view the latest operations log. For more information on changing the polling interval, see Android Configurations.
- Applications: This section lists all the applications installed on the device.
- Location: This section indicates the geographical location of the device.
- Policy Compliance: This section indicates whether the device complies with the policies enforced on the device. For more information on adding a policy and enforcing it on a device, see Policy Management.
...