In this tutorial, you will connect an Android device to WSO2 IoT Server and monitor the sensor data.
WSO2 IoT Server supports devices on Android version 4.2.x to 7.0 (Android Jelly Beans to Nougat)
The following subsections explain how you can work with the Android Sense device type:
Before you begin
Start the WSO2 IoT Server broker, core and, analytics profiles in the given order. For more information, see how to start the WSO2 IoT Server.
Enroll Android Sense
Sign in to the Device Management console.Click here for more information.
Click Enroll New Device.
If you are an Admin user, click themenu icon, and select DEVICE MANAGEMENT, to access the ENROLL DEVICE button.
- Click Android Sense to enroll a device of the type Android Sense.
Enroll the device.
Open the downloaded file, tap NEXT, and tap INSTALL.
- Tap OPEN, once the WSO2-SenseAgent is installed.
- Enter your details and tap REGISTER DEVICE.
- Username: Your WSO2 IoT Server username
- Password: The password you used to sign into WSO2 IoT Server
- Server URL: Provide the server URL in the
- Try out the Android Sense application.
If you want to add sensors, tap add sensor, select the sensors you wish to add, and tap OK.
For more information on configuring the accelerometer to work with Android Sense, see Configuring the Rapid Accelerometer of the Android Sense.
- If you want to push the data to the WSO2 IoT Server so you can view the data in real time or check out the historical data, tap push data to device .
View device analytics
To monitor real-time device statistics,
- Click on the device icon available on the Devices page, and navigate to Device Details page.
- To view location-based device statistics, follow the steps below:
Install the geo extension feature to WSO2 IoT Server, by navigating to
<IoTS_HOME>/wso2/analytics/scriptsdirectory and running the following command.
Enable the geo extension feature in WSO2 IoT Server, by opening the
cdm-config.xmlfile in the
<IoTS_HOME>/confdirectory and setting the following properties under the
<GeoLocationConfiguration>tag to true.
Restart the WSO2 IoT Server broker, core and, analytics profiles in the given order
Click on the Device Location tab.
For more information on location-based services, see Monitoring Devices Using Location Based Services.
Follow the options given below to see what you can do next:
Try out building the Android Sense source. For more information, see Building the Android Sense Agent.
Navigate to the Device Management page to view all the created devices.
Select a device from your device dashboard and check the available operations and monitor real-time data.