0

I've scoured the internet )hopefully thoroughly enough) and can't seem to find the answer I need.

I'm developing an app with Nativescript for both Android and iOS and am (or really want to) use the Pushy.io push notification service. The app (only tested on Android so far as the iOS build fails for some reason) receives the notification perfectly, but the problem is: - if the app is in displayed state, it navigates to the article page automatically, which it shouldn't - if the app is closed, it just launches the app but doesn't navigate to the article page - and sometimes if the app is closed, I don't receive the notification until the app is opened.

So my questions are: 1. How do I tell if the app is launched from a Push Notification vs a normal launch? 2. How to I get the app to direct to that page on notification tap if the app is in both active/displayed state or closed/suspend etc? 3. Is there a way to ensure the phone receives the notification even if the app is killed? (this is the entire point of push messaging, to drive users to the app)

Please help, I'm going crazy trying to figure this out.

delanick
  • 35
  • 2
  • 7
  • 1
    If I'm not wrong you must be running the navigation code too early when app is opened via notification which is why it may be working only when the app is already active. Without seeing any code can't say much on that. On Android, you may [extend the default receiver](https://github.com/EddyVerbruggen/nativescript-pushy/blob/master/src/pushy.android.ts#L84) to include extra in launch intent which you could compare in your activity create event. – Manoj Jul 18 '19 at 15:45
  • Apologies for the late response, thought I had already replied. I have the extra content for Android, not seeing anything about notification as starting point. Will have to speak to the creator of the plugin to expose that property. – delanick Jul 25 '19 at 07:23

0 Answers0