How to get data with local push using plugin.notifications.v2

I use plugin.notifications.v2 to push local notifications but when clicking on notifications, If my application is open, it retrieves data, but when the application is closed, it has no return value
Please help me!

If I remember correctly, you want to put this in main.lua

local launchArgs = ...
 
if ( launchArgs and launchArgs.notification ) then
    notificationListener( launchArgs.notification )
end

launch_args should contain the data you’re looking for. Note: This is just my tentative recollection and I hope it is not faulty.

https://docs.coronalabs.com/guide/events/appNotification/index.html#launch-arguments

This is the guide: https://docs.coronalabs.com/guide/events/appNotification/index.html
Linked under the docs page: https://docs.coronalabs.com/plugin/notifications-v2/index.html#overview

local push using plugin.notifications.v2 not get value return. It has no return event when the application is closed. It seems like a bug, waiting for Solar2D development team to fix it

@roaminggamer
When I tap on the notification on an android device, ‘launchArgs’ always returns nil. I don’t understand why. pls help me!

For a while launch arguments returns null, I am not sure it has ever worked. If the app is available (in the background) then you get the values, otherwise it doesn’t return anything.

The docs state quite explicitly that, on Android, local notifications are handled by the app and they are cleared when the app is terminated.

https://docs.coronalabs.com/plugin/notifications-v2/scheduleNotification.html

Also, from roaminggamer’s links: Note, however, that if the user starts the app by tapping directly on its icon, the notification will not be presented.

I don’t know if we are talking about the same thing. Other apps (non solar2d) when you get a notification and the app is closed there is a way to get those parameters from inside the app. For whatever reason in solar2d and android that has never worked. At least not for me.

I’m also having the issues with local notifications, launchArgs.notification return nil on cold start.

@vlads any update about this issue?