Not listen for notifications fired on Java Code

I can’t listener notification event if the app was started(background, foreground, etc) when the user tapped on a notification, and the notification its fired from Java (The listeners works fine when notifications fired from lua code).

 Anyone have idea if this is a restriction, or i’m doing something wrong ?

Anyone ?

Can you provide a better description of the problem?

Thanks

Rob

  • I send a local notificacion from a service of my java api.

  • The user tap the notification and the app is open

  • The method of handle the notification don’t work :

    local launchArgs = …  if ( launchArgs and launchArgs.notification ) then – Code end

I tested with a notification fired with Corona(notifications.scheduleNotification( 1, options )) and works, but a notification fired on java i dont know if the app start by notification-tap.

Same problem with IOS.

Thanks

Alberto

Rob?

According to engineering…

Regarding Android notifications via Corona Enterprise, it definitely works.  Just note that our Lua notification handling will only work for notifications generated by Corona.  Any other notifications that you’ve generated via Java code will not be handled Corona… and this is by design.

That said, the Android intent that launched your app can be received via the “main.lua” file’s “…” launch arguments.  The launch arguments will provide an “androidIntent” table providing all of the intent fields that can be copied over safely into Lua.  We also provide “androidIntent” information via “system” event type “applicationOpen”.  Have a look at the posting here for more details…

   http://forums.coronalabs.com/topic/28575-canopenurl-support-within-corona-sdk/?p=207672

Also note that there is one limitation on Corona Enterprise for Android.  The Corona generated notifications can only launch a “CoronaActivity” when tapped on.  If you derive your own class from our “CoronaActivity” class, then tapping a status bar notification will not work right.

Anyone ?

Can you provide a better description of the problem?

Thanks

Rob

  • I send a local notificacion from a service of my java api.

  • The user tap the notification and the app is open

  • The method of handle the notification don’t work :

    local launchArgs = …  if ( launchArgs and launchArgs.notification ) then – Code end

I tested with a notification fired with Corona(notifications.scheduleNotification( 1, options )) and works, but a notification fired on java i dont know if the app start by notification-tap.

Same problem with IOS.

Thanks

Alberto

Rob?

According to engineering…

Regarding Android notifications via Corona Enterprise, it definitely works.  Just note that our Lua notification handling will only work for notifications generated by Corona.  Any other notifications that you’ve generated via Java code will not be handled Corona… and this is by design.

That said, the Android intent that launched your app can be received via the “main.lua” file’s “…” launch arguments.  The launch arguments will provide an “androidIntent” table providing all of the intent fields that can be copied over safely into Lua.  We also provide “androidIntent” information via “system” event type “applicationOpen”.  Have a look at the posting here for more details…

   http://forums.coronalabs.com/topic/28575-canopenurl-support-within-corona-sdk/?p=207672

Also note that there is one limitation on Corona Enterprise for Android.  The Corona generated notifications can only launch a “CoronaActivity” when tapped on.  If you derive your own class from our “CoronaActivity” class, then tapping a status bar notification will not work right.