0

I've created a mobile application using android studio to control some leds, sensors, and locks. So I'd want to connect my mobile application to my raspberry pi to send and receive data, how could I do that? Is there more than one way? If yes, what is the easiest way?

0
0

It is absolutely possible.

You need to decide first how the two will be connected. Probably the easiest way would be via the network. You would then give the Pi a fixed IP address, so the android phone can find it.

An easy way to communicate would be via HTTP. You can use flask (if you're using Python on the Pi) to create a web server. With HTTP PUT you can also send commands from your Android-app to your webserver. You will need to dive into flask a bit to get it working.

3
  • Thank you very much! :) This was very helpful!
    – Emma
    May 30 at 18:29
  • Is there any tutorials or something that can show me how to send commands from my Android-app tp my webserver?
    – Emma
    May 30 at 18:31
  • Don't know much about Android; this is after all the Pi forum. But they tell me it is something like android { useLibrary 'org.apache.http.legacy' }. May 31 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.