Not getting a "notification" event when app foregrounded

Like the subject line says,  I’m not getting a notification event when the app is in the foreground.

Build 2014.2506

I just started playing with GameThrive push, so I’m not sure if I’ve got something wrong in the listener from the docs.

Could anyone using push verify there is no notification event when the app is in the foreground.

local function notificationListener( event )

if ( event.type == “remote” ) then
–handle the push notification

elseif ( event.type == “local” ) then
–handle the local notification
end
end

–The notification Runtime listener should be handled from within “main.lua”
Runtime:addEventListener( “notification”, notificationListener )

Nail

hmmm… I don’t understand why Corona doesn’t recognize the Notification from Apple, but I solved the issue.

The DidReceiveRemoteNotification function gets called from GameThrive when a Push is sent and the app is in the foreground.  I didn’t read the provided comment above the function in the sample project.

To get the message, I just added this block.  The sample function didn’t have it and would not fire.

function DidReceiveRemoteNotification(message, additionalData, isActive)
    print("…MESSAGE has been recieved  TOP !!!")
    
    if message then
        
        print("…MESSAGE has been recieved!!!")
        print("…message == ", message)
    end

I should have went to bed hours ago…

Nail

hmmm… I don’t understand why Corona doesn’t recognize the Notification from Apple, but I solved the issue.

The DidReceiveRemoteNotification function gets called from GameThrive when a Push is sent and the app is in the foreground.  I didn’t read the provided comment above the function in the sample project.

To get the message, I just added this block.  The sample function didn’t have it and would not fire.

function DidReceiveRemoteNotification(message, additionalData, isActive)
    print("…MESSAGE has been recieved  TOP !!!")
    
    if message then
        
        print("…MESSAGE has been recieved!!!")
        print("…message == ", message)
    end

I should have went to bed hours ago…

Nail