Android Question What solution is prefered?

Discussion in 'Android Questions' started by nazilabdulla, Jun 14, 2019 at 5:08 PM.

  1. nazilabdulla

    nazilabdulla Member Licensed User

    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?
     
  2. KMatle

    KMatle Expert Licensed User

    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.
     
  3. Brandsum

    Brandsum Active Member Licensed User

    You can use websocket or socket.io for peer to peer communication in realtime.
     
  4. techknight

    techknight Well-Known Member Licensed User

    Or depending on the situation, MQTT can work. Broker runs on where the server with static IP is, or you can use an online broker service.
     
    BillMeyer likes this.
  5. MarkusR

    MarkusR Well-Known Member Licensed User

  6. nazilabdulla

    nazilabdulla Member Licensed User

    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
     
  7. nazilabdulla

    nazilabdulla Member Licensed User

    How to over come NAT ? Devices will be behind NAT..
    Please share link for solution
     
  8. nazilabdulla

    nazilabdulla Member Licensed User

    For the MQTT we have to depend third party as Broker. That is the problem. Can we easily make our own online broker ?
     
  9. nazilabdulla

    nazilabdulla Member Licensed User

    Can u please confirm that server is able to call client ? I think Data can Send/Receive from client only. Please confirm it
     
  10. DonManfred

    DonManfred Expert Licensed User

    No.
    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))...
     
    Peter Simpson likes this.
  11. DonManfred

    DonManfred Expert Licensed User

  12. nazilabdulla

    nazilabdulla Member Licensed User

  13. MarkusR

    MarkusR Well-Known Member Licensed User

    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.
     
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