I have an Android app simulated on Android Studio and written in Java and a robot simulated in Webots using python. I am trying to figure out a way for them to communicate between each other so for example, the app can send a signal to webots to start/stop the robot, or the robot can send error messages to the app.
The only way I can think of doing this is to have them communicate through a web server, although I'm not sure how this will work in practice? Is there any other ways to do this or some libraries or specific methods I should use?