Best way to communicate between two phones

jfitchett56

Member
Licensed User
Longtime User
I've written an app that uses a server on one phone to respond to commands from another phone. currently I am using SMSintercept which works fine but has the disadvantage of being a bit slow and if the server app exits for any reason future sms message surface. I am now looking at using sockets.
The problem i forsee using sockets is that the IP can change quite often as the device moves from wifi to wifi and off wifi on cellular it may even change I think.
Is there some magic way to pin down the IP, use sms to get the ip? is sockets the beter way to go than SMS or is there a third option?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I don't think that there is one method that is superior in all cases. If the devices are not connected to the same local network then you will most probably not be able to communicate with sockets. Most mobile network providers block incoming connections.

This tutorial may be helpful in the case of SMS: Intent Filters - Intercepting SMS messages in the background

Another solution is to use an online web server with push notifications.
 
Upvote 0
Top