1

I wrote a little python app that is checking a website for a given price (price radar). This python script takes 3 variables: Start, destination, maximal price. When it finds a correct ride it posts it to a telegram bot. This python Script is on a Raspberry which allready has a Nginx-Server installed and is reachable through Dyn-DNS.

Now I am writing an Android App with which I want to start/control my python script. So I need to start this script and give it the variables I set in the Android App.

Which would be "Best practice" for this use case? Especially when you think about security.

Error 404
  • 105
  • 2
  • 10

1 Answers1

1

One option would be to have a constant socket open between your python script and your android app. However this would be quite taxing on battery life.

The better way to do this is to use background push messages, for android this can be done with Firebase Cloud Messaging. You basically intergrate the Firebase library into your app and from your python script, you do a post request to the Firebase servers. They will handle the delivery process to your Android app at basically no battery cost.

Bernd
  • 779
  • 5
  • 11