Answered Retrieve image url from push message

Hi, I'm trying to send image url while sending push notifications. Through the console, I set the url. In the app, I'm trying to retrieve it, so that I can construct a bitmap from there, and set to large icon. I found 2 ways to retrieve it. Firstly, there's a method PushMessage.getStylePayload(), which returns a string, containing big_picture url. But it contains extra text as well ('type'), so I'll need to maybe split it up (but that's a bit complex). Secondly, I can get it from the bundle(obtained from pushMessage.getPushBundle()). I can fetch the actionvalue map through it, but not really sure how to retrieve the action value corresponding to 'com.urbanairship.style'. I'd appreciate some help on this, I just want to get the value of 'big_picture' which contains the url sent through the console.

Didn't find what you were looking for?

New post

Comments

2 comments

  • I solved it, can't find the option to delete the post, so kindly ignore.

    Comment actions Permalink
    0
  • Hi Gaurav,

    I'll go ahead and mark this as resolved.

    Comment actions Permalink
    0

Please sign in to leave a comment.