Open specific screen of the app upon receiving push notification

I have an android app integrated with the SDK. But when I initialize the push notification inside the app through countly, I am forced to give a particular screen name which gets opened when the push notification is clicked.

How can I open a specific page of the app depending on the push notification detail? I googled around and found that "deep link" is one solution. But does countly provide the deep link facility?

Thanks,
subba

0

Comments

9 comments
  • You can send any URL with your message, including deep links if your app supports them.

    0
    Comment actions Permalink
  • @artem Hi, I have implemented notification on my application and I successfully receive notifications, but when I send a link with my notification two things happen upon reading public void onMessageReceived(RemoteMessage remoteMessage), either it's a https/http link and the link is correct, or it's a deep-link and remoteMessage's link property is NULL, I have implemented deep-linking in my application and it works from the browser when I check it, any idea why this problem might be caused or how to solve it?

    0
    Comment actions Permalink
  • @Mahan we don't use FCM message encoding scheme, but rather rely on our own, so unfortunately I cannot tell you anything regarding that. Just in case you missed it, to decode data sent from Countly dashboard, you can use similar code: https://github.com/Countly/countly-sdk-android/blob/master/app-messaging-fcm/src/main/java/ly/count/android/demo/messaging_fcm/DemoFirebaseMessagingService.java#L38

    0
    Comment actions Permalink
  • @artem Thank you very much.

    0
    Comment actions Permalink
  • @artem Unfortunately or not, I was doing it exactly like the link you sent however, I did realize something today which might help.
    51

    44
    As you can see, in the first try that I send google, value[1] has the link and the link is also correct.
    but in the next try, link is null, although value[1] has the correct link inside it.
    Now I understand this might be a bug that you would want to look into.
    but in the meantime, how safe is it for me to count on the data you are sending me, that I can read that data and look for my deep-link, and be sure to find it there, granted I had sent it from the panel.

    0
    Comment actions Permalink
  • Hi @Mahan,
    Could you give me an example of a link that fails?

    0
    Comment actions Permalink
  • mahan://openAchievements

    0
    Comment actions Permalink
  • Yep, our issue. Sorry for taking that much time
    Fixed in current master, basically it returns Uri instead of URL. Somewhat breaking change, but there's almost no way to return URL since Android doesn't seem to register its own URLStreamHandlerFactory anymore and polluting JVM with SDK-related thing is a no-go.

    Release is going to be out this week.

    0
    Comment actions Permalink
  • Thank you very much. Yes, especially if you work both android and iOS that is really frustrating to handle.

    0
    Comment actions Permalink

Please sign in to leave a comment.