public class ParcelableMqttMessage
extends org.eclipse.paho.client.mqttv3.MqttMessage
implements android.os.Parcelable
A way to flow MqttMessages via Bundles/Intents
An application will probably use this only when receiving a message from a Service in a Bundle - the necessary code will be something like this :-
private void messageArrivedAction(Bundle data) {
ParcelableMqttMessage message = (ParcelableMqttMessage) data
.getParcelable(MqttServiceConstants.CALLBACK_MESSAGE_PARCEL);
Use the normal MqttMessage methods on the the message object.
}
It is unlikely that an application will directly use the methods which are specific to this class.
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<ParcelableMqttMessage> |
CREATOR
A creator which creates the message object from a parcel
|
| Modifier and Type | Method and Description |
|---|---|
int |
describeContents()
Describes the contents of this object
|
java.lang.String |
getMessageId() |
void |
writeToParcel(android.os.Parcel parcel,
int flags)
Writes the contents of this object to a parcel
|
public static final android.os.Parcelable.Creator<ParcelableMqttMessage> CREATOR
public java.lang.String getMessageId()
public int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel parcel,
int flags)
writeToParcel in interface android.os.Parcelableparcel - The parcel to write the data to.flags - this parameter is ignored