I’m using GCM and that is not how you get the installation ID. It is passed through to the app when it is installed using something like this:
[lua]
function onNotification(event)
    print(" – main - onNotification(event)")
    
    if event.type == “remoteRegistration” then
        mojoData.PTOKEN = event.token    – Save off the installation token (push id)
–        native.showAlert( “remoteRegistration”, event.token, { “OK” } )
        print(" – saved token info: “, event.token)  
    elseif event.type == “remote” then
–        native.showAlert( “localNet Notification”, Json.encode( event ), { “OK” } )
        print(” – localNet Notification", Json.encode( event ) )               
        if( event.applicationState == “active” ) then
            native.setProperty(“applicationIconBadgeNumber”, 0)             – clear out list of notifications from notification center…
 
            native.showAlert( “localNet Notification”, Json.encode( event.alert ), { “OK” } )           
        end        
    end
    
    return true
end
– Tried adding the listener in systemListener(), but no go, so initializing right in main, like corona docs show – works here  
Runtime:addEventListener( “notification”, onNotification )
[/lua]
Argh… The website never likes my code blocks :/  Using Decoda editor, and mebbe it doesn’t use cr/lf or something 
 
      
    

