I can explain one scenario , please explain what solution I should choose..
Computers and mobile devices are different network and connected to internet. Need to communicate between these devices. I have one static IP server to route it.
If I use HTTP , only one side communication can do
Please let me know what solution need to prefer?
Use FCM (Firebasemessaging: DATA messages). WhatsApp, Facebook and other apps use it too. There are tons of examples here (and Google itsself). With it you can send messages to devices via Google servers (it's free!) from php or via an OKHttpUtils call.
I can explain one scenario , please explain what solution I should choose..
Computers and mobile devices are different network and connected to internet. Need to communicate between these devices. I have one static IP server to route it.
If I use HTTP , only one side communication can do
Please let me know what solution need to prefer?
if u use b4j & Jetty Server u can use web sockets, its bidirectional.
if your apps (b4a/b4j) share the same class file you can use B4XSerializator.
if u transfer data via internet you need https & ssl certificate.
Use FCM (Firebasemessaging: DATA messages). WhatsApp, Facebook and other apps use it too. There are tons of examples here (and Google itsself). With it you can send messages to devices via Google servers (it's free!) from php or via an OKHttpUtils call.
Is FCM working for windows also ? I think Firebasemessaging can do only for mobile devices, please confirm it . Because Some times I need to call windows device also
if u use b4j & Jetty Server u can use web sockets, its bidirectional.
if your apps (b4a/b4j) share the same class file you can use B4XSerializator.
if u transfer data via internet you need https & ssl certificate.
No. You can implement a broker in a B4J Server app. Where is the problem?
Sure you need to depend on 3rd party jar. But they are free to use.
You dont need to depend on any 3rd service.
I suggest to use a mqtt broker on your static ip machine running a b4j server app (implementing the broker).
All clients connect to the broker (even windows client) and listen to topics (or how this is called in mqtt (never used it so i´m not really familar))...
because server have a known fix domain name and there is a app that runs 24/7, the client app need connect first then you can send data in both directions via web sockets.
client app is always startet on demand.