[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [paho-dev] Is org.eclipse.paho.client.mqttv3.IMqttDeliveryToken.publish asynchronous?
|
Hi,
When the broadcast is sent by the LocalBroadcastManager, the broadcast is asynchronous, so you can take as long as you want inside your registered broadcast receiver. However this may be blocking the main thread of your application itself, so you'll want to be careful about that.
Kind regards,
James Sutton Software Engineer - IoT Foundation - MQTT Open Source Projects Technical Trojan - Wimbledon Project |
|
| Hursley Park Hursley, SO212JN United Kingdom |
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: "zhangkai.gis"<zhangkai.gis@xxxxxxx>
Sent by: paho-dev-bounces@xxxxxxxxxxx
To: "paho-dev"<paho-dev@xxxxxxxxxxx>
Cc:
Subject: [paho-dev] Is org.eclipse.paho.client.mqttv3.IMqttDeliveryToken.publish asynchronous?
Date: Wed, Mar 23, 2016 3:20 AM
Hi all,
I want to use publish in Broadcast Receiver's onReceive function.But I am not sure about the behavior about publish.As we know we cant do things more than 10s in Broadcast.Or we will get ANR.So can I use publish in Broadcast Receiver?
2016-03-23
zhangkai
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