How to exploit all sensors of your mobile phone as an IoT Device



This post will show you how you can exploit and send all data generated by the sensors of your mobile phone to the Internet of Things service by using Apache Camel, store the data with Elasticsearch and then how to visualize with Kibana.

Lastly, it shows you how to create & use a Rhiot Android application that exploit the following android sensors:

  • Accelerometer
  • Linear Acceleration sensor
  • Gravity sensor
  • Gyroscope
  • Light sensor
  • Orientation sensor
  • Other sensor ….

Here is an overview of the architecture:


How we can implement this?

  • Step1: Install Camel Route on JBoss Fuse:


As you can see from the camel route, after we retrieve messages from the HTTP endpoint, we will process it and store them into Elasticsearch, which will be picked up by Kibana and displayed in a Dashboard.

  • Step 2: At Elasticsearch level, you have to create a new index, with the following mapping:
  • Step 3: At this moment all data are available in Elasticsearch, and we have just to explore, discover data and visualize it via Kibana. For that you have to create some visualizations that will be included to you Dashboards.
  • Step 4: Install and configure the Android app

The Rhiot app is now installed on your Android device.

Note: The .apk file is compiled for Android version 5.0.1.

    • Start the Rhiot app.
    • Fill the URL and click on Start button.














Below an example of the Dashboard generated:


You can find the project code here:


Admittedly, this example is very simple and allows learning easily how to turn your mobile phone into a sensor device, connect it to the Internet of Things server (Can be a Rhiot gateway), and send and receive data. You also learned how to process and visualize device data with Apache Camel and Kibana.

I hope that you find this post useful and good luck with your projects!


Abdellatif Bouchama

Abdellatif's main area of expertise lies within the fields of SOA, ESB, BigData and IoT.

You may also like...

3 Responses

  1. Naik says:

    The APK file is Not available. Please share the working url.

  2. steve says:

    The link for project code is broken. Appreciate if you update with the link for camel code and the android code.

Leave a Reply to Abdellatif Bouchama Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>