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.
Before you begin
- Make sure to enable the virtualization technology on your basic input/output system (BIOS). This is required to create the Android virtual device.
Start the WSO2 IoT Server core profile.
Let's get started!
Sign in to the Device Management console.Click here for more information.
- 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.
Install the Android SDK on your computer by entering
If you have an Android SDK already installed on your computer, enter
y, and provide its location when prompted.
Create the AVD by entering
Next, the system prompts to create a custom hardware profile by requesting for device specific details. You can enter
noas the response and skip this step.
If you have multiple AVDs, enter WSO2_AVD to continue with the tutorial.
If you only have the
WSO2_AVDon 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
passwordand proceed with the installation.
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.
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.
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.
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.
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.Example:
Organization: This field is optional. You need to enter organization name only if you are running in a multi-tenant environment.
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.
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.
- Create a policy and see how it is applied on the device. For more information, see Policy Management.
- Add your enrolled device or devices to a group. Grouping allows you to monitor and view device data of many devices in one go. For more information, see Grouping Devices.
- Rename your enrolled device so it will be easy for you to find your device. For more information, see Renaming a Device.