3 Replies Latest reply on May 5, 2012 4:43 PM by arthurportas

    Fuse on Android

    ozi87

      Hi,

       

      I have been wondering if there is any chance to connect Fuse Message Broker to Android.

       

      If it is, what is the best approach?

       

      Witch connection protocol to use?

       

      One approach is to use a STOMP protocol, in Android we can use a library called STOMJ to connect to the broker, i don know if this is the best approach.

       

      In attachment is the java class that i had made to do what i need, but could not connect to the server.

       

      There is another solution?

       

      I saw that can be connect with Rest and XMPP, but it does not appear to be a good approach...

       

      Someone know how to resolve my problem?

       

      Best Regards

        • 1. Re: Fuse on Android
          garytully

          STOMP is a good approach.

          From a cursory look at your attachment, i think the problem is that your connection is not left open long enough to receive any messages.

          You use a message listener, then disconnect the connection. You either need to a synchronous (blocking) receive or leave the connection open for some period to give the broker a chance to deliver a message to you.

          • 2. Re: Fuse on Android
            ozi87

            I simple does not disconnect or can i use a thread ?

            • 3. Re: Fuse on Android
              arthurportas

              Hi, i'm currently using stomp on android to connect to fuse and it work's good.

              Send me an message an i'll give you the the class thar connects to fuse on android.