3

I have integrated GCM in my application.but when i tested in ASUS’s ZenFone 2 Lollipop version after closing the app by swiping ie , in background state the GCM push notification couldn't receive.i have surfed about this and i saw about the Auto-Start Manager and after i set "Allow" my app in ASM then it works fine.

Manifest

  <!-- [START gcm_permission] -->
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <permission
        android:name="<package_name>.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />
    <uses-permission android:name="<package_name>.permission.C2D_MESSAGE" />
    <!-- [END gcm_permission] -->


    <!-- GCM Service -->
    <receiver
        android:name="com.google.android.gms.gcm.GcmReceiver"
        android:exported="true"
        android:permission="com.google.android.c2dm.permission.SEND">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />

            <category android:name="<package_name>" />
        </intent-filter>
    </receiver>

    <service
        android:name=".gcm.GcmListenerService"
        android:exported="false">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
        </intent-filter>
    </service>
    <service
        android:name=".gcm.InstanceIDListenerService"
        android:exported="false">
        <intent-filter>
            <action android:name="com.google.android.gms.iid.InstanceID" />
        </intent-filter>
    </service>
    <service
        android:name=".gcm.RegistrationIntentService"
        android:exported="false" />

But I'm afraid the awareness of a normal user about it.any way to overcome this worry ? how to prevent my app deny from the "ASM" ?

Stella
  • 1,817
  • 6
  • 30
  • 55
  • possible duplicate of http://stackoverflow.com/questions/24313539/push-notifications-when-app-is-closed – abielita Feb 02 '16 at 01:49
  • Same problem here!!! The problem for me is with Huawei and Asus Phone – Manza Feb 27 '16 at 10:45
  • Same problem as http://stackoverflow.com/questions/38843579/set-allow-permission-by-default-in-asus-auto-start-manager-from-code – Vignesh PT Aug 09 '16 at 08:43

0 Answers0