Empty push object from getLaunchNotification (Android/Phonegap)

On Android using Phonegap, when the application is launched because of a tap on a push notification, the getLaunchNotification method is always returning an empty push object. We are doing the following:

  function(push) { 

There are two place where we are checking if the app was launched by an notification:

  1. the app starts (onDeviceReady) 
  2. on resume event (onResume)

Tapping a notification push launches the app and the alert fires showing "{ }". On iOS however, the push contains a message, our extras, etc. We've copied the examples from the docs as well as tried a myriad of combinations for enabling/disabling pushes and user notifications but with no luck.

Didn't find what you were looking for?

New post



  • Hi Shaun,

    I just tested the code snippet you posted and was able to get the push object to show in the alert. Can you please send me the output of the following commands?

    cordova --version
    cordova platform
    cordova plugin

    This will help me troubleshoot your issue more quickly.

    Comment actions Permalink
  • We can't run cordova from the the command line, but updating our phonegap-version to cli-6.0.0 fixed this issue.

    We were previously on cli-5.2.0 and were unable to get this plugin to work.

    Comment actions Permalink
  • Perfect. Glad to hear it.

    If you are using the PhoneGap CLI, I believe these commands should work the same, but replacing "cordova" with "phonegap".

    Please let me know if you have any other questions or concerns.


    Comment actions Permalink

Please sign in to leave a comment.