facebook

websocket + native app

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #340645 Reply

    renato.guiglia
    Participant

    I will implements this architecture: native app implemented with phone sdk (ios sdk or android sdk) that manage low level function (nfc, ecc) that open a communication port, then implement a native app with mobione for the frontend that communicate with the other low level app.
    From Mobione is it possible to communicate using WebSocket or send a raw message on a standard socket?
    The alternative that i think is to implement a small httpserver inside the low level app and use ajax call from mobione.

    #340649 Reply

    support-michael
    Keymaster

    >From Mobione is it possible to communicate using WebSocket or send a raw message on a standard socket?

    Yes, you can use websockets in your app for the latest versions of ios and android. Alternatively you can use socket.io or similar lib. The MobiOne Test Center does not support the websocket api. The next version of MobiOne (2.5 a milestone will be available this week) will include an alternative to the Test Center which will support the latest HTML5 apis.

    #340682 Reply

    renato.guiglia
    Participant

    @support-wayne wrote:

    >From Mobione is it possible to communicate using WebSocket or send a raw message on a standard socket?

    Yes, you can use websockets in your app for the latest versions of ios and android. Alternatively you can use socket.io or similar lib. The MobiOne Test Center does not support the websocket api. The next version of MobiOne (2.5 a milestone will be available this week) will include an alternative to the Test Center which will support the latest HTML5 apis.

    I test it on devices, so it’s not a problem.
    I ask this because i try to use websocket in android (4.4.2) and it doesn’t work, websocket are not supported.
    I also found this page http://caniuse.com/websockets

    Do you have an example of working websocket?

    Thank you

    #340695 Reply

    Hi renato,

    We don’t have a websocket example but there are plenty that are just a google search away. You will need your own http server app to handle the i/o. Also as you indicate that web sockets may not be implemented on all of your target browsers. So use of a library such as socket.io should be considered.

    #340727 Reply

    renato.guiglia
    Participant

    @support-octavio wrote:

    Hi renato,

    We don’t have a websocket example but there are plenty that are just a google search away. You will need your own http server app to handle the i/o. Also as you indicate that web sockets may not be implemented on all of your target browsers. So use of a library such as socket.io should be considered.

    In the end, I choose this architecture:
    *an app written with os SDK with a standard implementation of a webserver (there are some open project for android and apple) tha could make every low level operation.
    *Mobione native app for the frontend that communicate with the other app using $.ajax calls.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: websocket + native app

You must be logged in to post in the forum log in