How to launch a specific screen/activity of an app via push notifications in Corona sdk ?
Jump to content
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
Community Forum Software by IP.Board