开发者

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) { }

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜