Generate our own notification in our plugin

Hi,

We are facing some problems with push notifications. We have implemented corona’s push notification listener and we get a notification whenever there is a new push. But the problem is we want our plugin to generate this notification whenever there is a push for our origin. We tried calling our method in the notification listener but it cannot generate a notification.

local launchArgs = ... if ( launchArgs and launchArgs.notification ) then notificationListener( launchArgs.notification ) end local function notificationListener( event ) if ( event.type == "remoteRegistration" ) then --handle the push notification l.registerDeviceToken(tostring(event.token)) elseif ( event.type == "remote" ) then if(event.androidGcmBundle.origin == "helpshift") then l.handlePush(tostring(event.androidGcmBundle.issue\_id)) end end end Runtime:addEventListener( "notification", notificationListener )

HandlePush is our method in plugin which tries to generate a Notification through NotificationManager notifiy method but we are unable to see this notification. We can only see Corona’s Notification.

Can you please help us with this?

Basically we want a method where all push from our origin can be processed by our plugin and generate notification. Please suggest some method for this.

Thanks.