[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [paho-dev] About synchronous use of MqttAndroidClient
|
Hi Jeff, thank you so much. However I've not problem with MqttClient or MqttAsyncClient (I use the token fine on this one). My problem is using MqttAndroidClient toguether with Mqtt Android Service.
I started to create my own android service using MqttClient and MqtAsyncClient but started to use the MqttService of paho to reuse code and not to reinvent the wheel. But it is being very problematic :-(. I'm having lots of issues that I didn't have before when I was programming my own service. I'm supossing, of course, that MqttAndroidClient works fine, although I've found some of my problems in the paho android service sample app.
I'll continue investigating. Thanks again.
El 13/05/2015 00:22, "Jeff Prestes" <
jeffprestes@xxxxxxxxx> escribió:
Hi Manuel,
The workaround I've created to fix this use Thread.sleep(100) to give the mobile app time to process instead of use waitForCompletion. Also, I use MqttClient instead of MqttAsyncClient and perform some isConnected checks to avoid Exceptions.
You can try it until better solution is being built.
If you want to check an example that works for me, you can check this code out:
I hope it might help you.
Cheers,
-Jeff Prestes