Android Question Communicate with a service written in Java?

Discussion in 'Android Questions' started by TheMightySwe, Mar 28, 2015.

  1. TheMightySwe

    TheMightySwe Active Member Licensed 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
     
  2. thedesolatesoul

    thedesolatesoul Expert Licensed User

    Yes
    Look in the similar threads for a tutorial
     
    DonManfred and barx like this.
  3. TheMightySwe

    TheMightySwe Active Member Licensed User

    Yes, i have read that, but does it work when one of the apps is a service written in Java.
     
  4. thedesolatesoul

    thedesolatesoul Expert Licensed User

    What makes you think it wont?
     
  5. TheMightySwe

    TheMightySwe Active Member Licensed User

    It seems to be very hard to just answer YES or NO on a specific question sometimes?
     
  6. thedesolatesoul

    thedesolatesoul Expert Licensed User

    It seems to be very hard to read the very first word of the first reply somethimes?
     
    timwil, DonManfred and keirS like this.
  7. warwound

    warwound Expert Licensed 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.
     
    TheMightySwe likes this.
  8. xiaoyao

    xiaoyao Member Licensed 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.
     
  9. TheMightySwe

    TheMightySwe Active Member Licensed User


    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.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice