Page 1 of 1

Android application showing real time data

Posted: Tue Nov 26, 2019 2:50 pm
by nick8967
So, I am trying to build an application in android that I need to read data from a Raspberry wirelessly. I am searching on google but I got confused. Can I read data from the wifi of the Raspberry? Should I run a more specific application on RaspberryPi? Should I go better to bluetooth? I don't know how to construct the whole thing...

Another alternative I am thinking is to connect the Raspberry to the ethernet and run it as a server. So I visit the IP address of the Raspberry Pi and get the data with the android app..Does this make sense?

Re: Android application showing real time data

Posted: Tue Nov 26, 2019 3:36 pm
by neilgl
Yes you can read data from the pi via WiFi. Let us say the phone and pi are connected to the same network via wifi
You could install mqtt on the pi to publish a topic that contains the data you want, then the android app subscribes to that topic to get the data.
Or set the pi up as a webserver (e.g. apache2 or nginx or flask) and "visit" it to get the data.
And there are many other ways...
You could also set the pi as an access point (create a WiFi SSID for it) and connect to that with your phone.

Re: Android application showing real time data

Posted: Tue Nov 26, 2019 3:51 pm
by nick8967
What about Kafka? Can be run on RaspberryPi?

Re: Android application showing real time data

Posted: Tue Nov 26, 2019 3:53 pm
by DirkS
nick8967 wrote:
Tue Nov 26, 2019 3:51 pm
What about Kafka? Can be run on RaspberryPi?
I don't think he runs anywhere these days
https://www.wikiwand.com/en/Franz_Kafka

Re: Android application showing real time data

Posted: Wed Nov 27, 2019 10:19 am
by neilgl
Yes looks like Kafka and Zookeeper can run on a pi4 - though I have not done it myself yet.