I'm looking for advice regarding sending and receiving data between raspberri pi 3 and other devices assuming everything has internet connection.
The data I'm looking to send doesn't have to be bigger than a single character, i've done it through serial communication but I would like to advance further to wirelessly sending the data.
Currently I just need an option to send from raspberri pi the characters '1' to '9' and receive those characters. What tools should I use to do that ? Is there a difference between a solution that assumes the devices are on the same wireless network ( when the not-raspberri device acts as wireless hotspot) and a solution that assumes both devices have internet but on different networks?
I checked around with google and I saw one of the solutions is using tcp packets but I wonder if that's really the best option for me considering I need to send and receive so little data.
In addition the ideal way for me to send and recive the data is with an android application if it makes any difference, but it's unclear for me what libraries and tools I should use for my purpose.
EDIT: I figured that using the wifi and sim would be totally different solutions so for simplicity you can just refer to the wifi subject.