Android: Launching app from push notification fails

I’m having an issue with Corona Enterprise for Android where the push notifications only launch the app every 2nd or 3rd time.   

This is happening when the app is in the background after hitting the home button.  So to reproduce:

  1. Launch the app

  2. Hit home button to suspend it

  3. Send push from server behind the scenes

  4. Receive Push

  5. Click on the push in notification center

The result is maybe 1 out of 3 actually launches the app.  

The rest of the time when I click on the notification nothing seems to happen. When it does launch everything 

is perfect and I see the custom data I attached to the push notification, etc. I have the notifications plugin 

installed properly as I am actually receiving these push notifications in the notification center.

I used the enterprise starter android app. Below is my manifest:

\<?xml version="1.0" encoding="utf-8"?\> \<manifest xmlns:android="http://schemas.android.com/apk/res/android" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; package="com.sample.app" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:versionCode="100" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:versionName="1.0" &nbsp; &nbsp; &nbsp;android:installLocation="auto"\> \<!-- Set the minimum and target Android API levels here to inform the app store what OS versions this app supports. Set the "minSdkVersion" to at least API level 10 (aka: Android 2.3.3 "Gingerbread") which is the minimum Corona supports. Set the "targetSdkVersion" to the API level that you compile with. Set to a high level to avoid compatibility mode. --\> \<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="20"/\> \<!-- Permissions required by this app. --\> \<uses-permission android:name="android.permission.INTERNET"/\> \<uses-permission android:name="android.permission.ACCESS\_NETWORK\_STATE"/\> \<uses-permission android:name="android.permission.READ\_PHONE\_STATE"/\> &nbsp; \<uses-permission android:name="android.permission.WRITE\_EXTERNAL\_STORAGE" /\> &nbsp; \<uses-permission android:name="android.permission.READ\_EXTERNAL\_STORAGE" /\> &nbsp; \<uses-permission android:name="android.permission.ACCESS\_WIFI\_STATE" /\> &nbsp; \<uses-permission android:name="android.permission.ACCESS\_FINE\_LOCATION" /\> &nbsp; \<uses-permission android:name="android.permission.ACCESS\_COARSE\_LOCATION" /\> &nbsp; \<uses-permission android:name="android.permission.READ\_PHONE\_STATE" /\> &nbsp; \<uses-permission android:name="android.permission.CAMERA" /\> &nbsp; \<uses-permission android:name="com.android.vending.BILLING" /\> &nbsp; \<uses-permission android:name="android.permission.BIND\_ACCESSIBILITY\_SERVICE" /\> &nbsp; \<uses-permission android:name="android.permission.INTERACT\_ACROSS\_USERS\_FULL" /\> &nbsp; \<uses-permission android:name="android.permission.VIBRATE" /\> &nbsp; \<uses-permission android:name="android.permission.GET\_ACCOUNTS" /\> &nbsp; \<uses-permission android:name="android.permission.RECEIVE\_BOOT\_COMPLETED" /\> &nbsp; \<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /\> &nbsp; \<permission android:name="com.sample.app.permission.C2D\_MESSAGE" android:protectionLevel="signature" /\> &nbsp; \<uses-permission android:name="com.sample.app.permission.C2D\_MESSAGE" /\> \<!-- Informs the app store that this app requires OpenGL ES 2.0 as a minimum. Required by Corona. --\> \<uses-feature android:glEsVersion="0x00020000"/\> \<!-- Informs the app store what features are required or are optional for this app. --\> \<!-- Setting the telephony feature to not required allows this app to be installed by devices that are not phones. --\> \<uses-feature android:name="android.hardware.telephony" android:required="false"/\> \<!-- Provides information about this app. The "name" attribute should be set to the name of the class that extends/inherits from the Application class. The "label" attribute sets the name of the application as how it is shown to the end-user. --\> \<application android:name="CoronaApplication" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:label="SampleApp" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:hardwareAccelerated="true" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:icon="@drawable/ic\_launcher" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:debuggable="true"\> &nbsp; &nbsp;&nbsp; \<!-- The main Corona activity that runs the Corona project. --\> \<activity android:name="com.ansca.corona.CoronaActivity" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:screenOrientation="portrait" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:configChanges="keyboardHidden|orientation|screenSize" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:label="SampleApp" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:launchMode="singleTask" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:exported="true" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:theme="@android:style/Theme.NoTitleBar.Fullscreen" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \<!-- android:launchMode="singleTask" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:theme="@android:style/Theme.NoTitleBar.Fullscreen" --\> \<intent-filter\> \<action android:name="android.intent.action.MAIN" /\> \<category android:name="android.intent.category.LAUNCHER" /\> \</intent-filter\> \<intent-filter\> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \<action android:name="android.intent.action.VIEW" /\> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \<category android:name="android.intent.category.DEFAULT" /\> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \<category android:name="android.intent.category.BROWSABLE" /\> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \<data android:scheme="sampleapp" /\> &nbsp; &nbsp; &nbsp; \</intent-filter\> \</activity\> \<!-- Other Corona activities that can be launched by the main Corona activity. --\> \<activity android:name="com.ansca.corona.CameraActivity" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:theme="@android:style/Theme.NoTitleBar.Fullscreen" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:configChanges="keyboardHidden|orientation|screenSize" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:screenOrientation="portrait" /\> \<activity android:name="com.ansca.corona.VideoActivity" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:theme="@android:style/Theme.NoTitleBar.Fullscreen" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:configChanges="keyboardHidden|orientation|screenSize" /\> \<activity android:name="com.ansca.corona.purchasing.StoreActivity" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:theme="@android:style/Theme.NoTitleBar.Fullscreen" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:configChanges="keyboardHidden|screenSize|orientation" /\> &nbsp; &nbsp; \<activity android:name="com.facebook.LoginActivity" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:theme="@android:style/Theme.NoTitleBar.Fullscreen" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:configChanges="keyboardHidden|screenSize|orientation"/\> &nbsp; &nbsp; \<activity android:name="com.ansca.corona.facebook.FacebookFragmentActivity" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:theme="@android:style/Theme.NoTitleBar.Fullscreen" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:configChanges="keyboardHidden|screenSize|orientation"/\> \<!-- Corona content provider required by the video player and mail app to access this app's local files. --\> \<provider android:name="com.ansca.corona.storage.FileContentProvider" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:authorities="com.sample.app.files" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:exported="true" /\> \<!-- Corona service used to perform background operations such as managing notifications. --\> \<service android:name="com.ansca.corona.CoronaService" /\> \<!-- Receiver which automatically starts this application after the Android device starts up. This is needed to show this application's active status bar notifications and reschedule pending notifications after the device boots up, because they will only be shown if the app is running. This receiver only works if the "android.permission.RECEIVE\_BOOT\_COMPLETED" permission has been set. --\> \<receiver android:name="com.ansca.corona.SystemStartupBroadcastReceiver"\> \<intent-filter\> \<action android:name="android.intent.action.BOOT\_COMPLETED" /\> \</intent-filter\> \</receiver\> \<!-- Handles local/scheduled notification events. --\> \<receiver android:name="com.ansca.corona.notifications.AlarmManagerBroadcastReceiver" /\> \<receiver android:name="com.ansca.corona.notifications.StatusBarBroadcastReceiver" /\> \<!-- Listens for Google Cloud Messaging push notifications and registration messages. --\> \<receiver android:name="com.ansca.corona.notifications.GoogleCloudMessagingBroadcastReceiver" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:permission="com.google.android.c2dm.permission.SEND" \> &nbsp; &nbsp; &nbsp; \<intent-filter\> &nbsp; &nbsp; &nbsp; &nbsp; \<action android:name="com.google.android.c2dm.intent.RECEIVE" /\> &nbsp; &nbsp; &nbsp; &nbsp; \<action android:name="com.google.android.c2dm.intent.REGISTRATION" /\> \<category android:name="com.sample.app" /\> \</intent-filter\> \</receiver\> \<!-- Listens for Google Play/Marketplace in-app purchase responses and notifications. --\> \<receiver android:name="com.ansca.corona.purchasing.GoogleStoreBroadcastReceiver"\> \<intent-filter\> \<action android:name="com.android.vending.billing.IN\_APP\_NOTIFY" /\> \<action android:name="com.android.vending.billing.RESPONSE\_CODE" /\> \<action android:name="com.android.vending.billing.PURCHASE\_STATE\_CHANGED" /\> \</intent-filter\> \</receiver\> \</application\> \</manifest\>

I’m seeing this appear a lot in the logs but it seems to have no bearing on whether the app will launch

from the push notification or not:

broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.sample.app (has extras) }

Any thoughts?