Internet Of Things with Android

Internet Of Things with Android In this article I’m showing you how turns your Android…

Internet Of Things with Android

Internet Of Things with Android

Internet Of Things with Android In this article I’m showing you how turns your Android…

Internet Of Things with Android

Internet Of Things with Android
Internet Of Things with Android

Internet Of Things with Android

In this article I’m showing you how turns your Android phone into a IoT device. I used the IoT Starter application, it is an application for interacting with the IBM Internet of Things Foundation. The application turns your mobile device into a sensor that publishes and receives data to and from the cloud using the MQTT protocol.

You can download the code from GitHub or the android app here.

IoT Foundation is a cloud-hosted service to simplify managing all of your IoT devices. The key features provided by the service include: device management, scalable connectivity, secure communication, historical data.

With IoT Starter application you can try Internet Of Things with Android and provides a variety of events and commands that it can publish or receive data to and from. Events and commands are user defined values used to differentiate the data that you publish or receive. For example, if you have a device that is publishing GPS coordinates, you may choose to publish it as a GPS event. Or, if you want to send an alert command to a device, you may choose to publish it as an alert or notification command. The application can publish data to the following event topics:

  • Accelerometer (accel event)
  • Touchmove (touchmove event)
  • Text (text event)

Here the steps:

First one in Bluemix you have to add the IBM Internet of Things service that lets your apps communicate with and consume data collected by your connected devices, sensors, and gateways, so your apps can then use real-time and rest-APIs to communicate with your devices and consume the data you’ve set them up to collect with the Internet of Things service:

IBM Watson IoT platform self-service
IBM Watson IoT platform self-service

Next, on the Internet of Things service click on Dashboard. This will open the configuration page for the service. From here, you can click the Add device button and add Android device with an ID that you will set on the smart phone application later :

IoT foundation service add devices
IoT foundation service add devices

then you are able to generate API key and authorization token to use in android application to connect to IoT foundation service :

api keys and token for organization
api keys and token for organization

From your android smart-phone install this app, to allow the installation of .apk app on your Android phone you only have to go to Menu > Settings > Security and tick the box that says Unknown Origins or Unknown Sources. At this time running the IoT Starter application, at the first launch the application, a Login screen will appear where you have enter the following information defined before in Internet of Things service:

IoT organization
Device ID
Authorization token

IoT Startert configuration
IoT Startert configuration

Once you have entered the correct values, the device is ready to connect to your IoT service by  activate sensor button. While the application is connected, it can handle a few different kinds of inputs and outputs. All inputs come from IoT command topics. All outputs go to IoT event topics.

IoT Startert accelerometer data
IoT Startert accelerometer data

To display the device data I used the IoT Platform Analytics Real-Time Insights. By IoT Real-Time Insight you can perform analytics on real-time data from your Internet of Things devices, and gain insights about their health and the overall state of your operations. I created a simple dashboard with the acceleration data received from Internet Of Things with Android:

IBM Watson IoT Platform Analytics Real-Time Insights
IBM Watson IoT Platform Analytics Real-Time Insights

By IoT started you can use other sensors present in an Android smart-phone, not only for acceleration. I believe there are much more use-cases, for example in node-RED you can trigger smart flows based on phone events. We will enjoy a lot with this app.

Any comments and suggestions are welcomed.

 

Suggested Reading

  • |

    Turkiye Sovereignty and the Shift Beyond Europe

    Türkiye’s first hyperscale cloud region is not just infrastructure. It shows that sovereignty is becoming a design principle shaping how nations build and control their digital stack.

  • |

    The Space Between Sounds

    Vinyl and high-resolution streaming seem like opposite worlds.
    But when the system gets out of the way, they start to converge.
    Not in sound.
    In space.

  • | |

    The Great Reorg: The End of Organizations as We Know Them

    AI is not simply accelerating work.
    It may be reshaping how organizations are structured, how decisions flow, and how coordination happens.
    What is emerging is not just efficiency.
    It looks closer to a structural shift.

  • |

    Beyond Hyperscalers: MongoDB Offerings Across Europe’s Sovereign Clouds

    A practical map of MongoDB offerings across Europe’s sovereign cloud providers. Explore where MongoDB is available, how it is delivered, and access direct links to deploy it across DBaaS, Kubernetes, and managed platforms.

  • | |

    Beyond Code Translation: Why Your COBOL Modernization Should Skip the Relational Trap

    Forget the double migration. Use AI-driven semantic analysis to leap directly from Mainframe to document-oriented…