Android Question Communicate with a service written in Java?

TheMightySwe

Active Member
Licensed User
Longtime User
Hi all,

Is it possible to communicate with an external service written in java with Intents or something from and to B4A?

The communication must be bi-directional.

/ TMS
 

warwound

Expert
Licensed User
Longtime User
If you have control over the service - you are writing the java code - then you can use use Intents and BroadcastReceivers to communicate between b4a code and the service.
 
Upvote 0

xiaoyao

Active Member
Licensed User
Longtime User
IF USE socket,i think it's a new method,so it can work on same app or 2 app.try to use by events.java code:
ba.raiseEvent (***)
then b4a can do it.
 
Upvote 0

TheMightySwe

Active Member
Licensed User
Longtime User
If you have control over the service - you are writing the java code - then you can use use Intents and BroadcastReceivers to communicate between b4a code and the service.


Yes, that was the answer I was looking for, ofcourse I can use a Broadcast reciver for the "back" communication. Sometimes the answer is so simple and you just doesn't think about it.
 
Upvote 0
Top