Accessing JSON Extras in Urban Airship for Android
I saw this link on Urban Airship's website, stating that C2DM pushes require the new JSON key/value pair configuration: http://support.urbanairship.com/customer/portal/articles/79134-sending-extras-in-your-android-push
My question i开发者_如何学编程s, how do I access these extras inside my IntentReceiver? All of the API references I can find refer to the old string-based method of sending extras.
The extra data can also be accessed from the UrbanAirship Inbox
RichPushMessage message =
UAirship.shared().getRichPushManager().getRichPushInbox().getMessage(messageId);
if(message != null)
{
JSONObject jobj = message .getRawMessageJSON();
try {
JSONObject jobj1 = new JSONObject();
jobj1 = jobj.getJSONObject("extra");
} catch(Exception e) { }
精彩评论