Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

Push Notifications and Deep Linking
Started by m.shoaib.mughal96 Jan 20 2019 10:54 PM

- - - - -
1 reply to this topic
push notifications
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 3 posts
  • Corona SDK

How to launch a specific screen/activity of an app via push notifications in Corona sdk ?

[TOPIC: post.html]

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,608 posts
  • Enterprise

If your device gets a push notification and your push service supports passing a "custom" table, then:


1. if your app is not running at all (cold start) and the user interacts with the push notification, Corona will start and launchArgs will contain the event table which will include the custom table. You can use information in the custom table to determine what part of your app to present to the user.


2. if the user starts the app by tapping on the app icon, the push notification will be lost and you won't get any information about the notification at all.


3. if your app is in the foreground and you've registered an event listener to watch for notification events, you will get the event table and if it has a custom sub-table, you can react to it.


4. if your app is backgrounded (not the current app, or on the home screen) and the user interacts with the push notification, your app will be brought to the foreground and it will receive a notification event and you can use the customer sub-table to show specific content.


See our guide on notifications: http://docs.coronalabs.com/guide/events/appNotification/index.html