IBM United Kingdom Limited Registered in England and Wales with number 741598 Registered office: PO Box 41, North Harbour, Portsmouth, Hants. PO6 3AU
----- Original message ----- From: "onkelsers ." <dummyforforum@xxxxxxxxxxxxxx> Sent by: paho-dev-bounces@xxxxxxxxxxx To: General development discussions for paho project <paho-dev@xxxxxxxxxxx> Cc: Subject: Re: [paho-dev] Android - waitForCompletion() when connecting Date: Mon, Jan 18, 2016 12:59 PM
I'm not sure if it's a good practice to put all subscriptions into the onSuccess block of the listener, but I don't know of another way the the moment.
James, who knows most about this, is away this week - I'll talk to him when he gets back.
Have you looked at any of the sample code to see if it shows you how it should work? Seems like a natural use case. Does subscribe fail if you call it too soon? I was thinking it might get queued.
Ian
On 01/12/2016 09:56 AM, onkelsers . wrote:
Hello,
I'm using the Android service v 1.0.2. Calling the waitForCompletion method seems to create a deadlock, at least on my devices. I tried it with an empty activity, creating only a client calling connect() and waitForCompletion() in onCreate().
Am I missing something here? I just want to determine the time the connection is established so I can subscribe to some fixed subjects.
_______________________________________________ paho-dev mailing list paho-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/paho-dev
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU