0

I have two GCM receivers in my app. One of them is used by urbanAirship and the other is used by our application for another service. I am experiencing a strange problem now. Sometimes push notifications work for an installation and if i try to uninstall and install it again, i don't receive anything. I guess it has to do with GCM registration token but i don't see any errors for that in the logs. Here are my receivers for GCM in the manifest file

<!-- GMS native receiver -->
        <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="my_package_name" />
            </intent-filter>
        </receiver>

        <service
            android:name=".services.MyGcmListenerService"
            android:exported="false" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
            </intent-filter>
        </service>
        <service
            android:name=".services.MyInstanceIdListenerService"
            android:exported="false" >
            <intent-filter>
                <action android:name="com.google.android.gms.iid.InstanceID" />
            </intent-filter>
        </service>
        <service
            android:name=".services.RegistrationIntentService"
            android:exported="false" >
        </service>

and this is the receiver for the library

receiver android:name=".ninja.push.IntentReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="com.urbanairship.push.CHANNEL_UPDATED" />
                <action android:name="com.urbanairship.push.OPENED" />
                <action android:name="com.urbanairship.push.RECEIVED" />
                <action android:name="com.urbanairship.push.DISMISSED" />

                <category android:name="${applicationId}" />
            </intent-filter>
        </receiver>
Cœur
  • 37,241
  • 25
  • 195
  • 267
Sayed Jalil Hassan
  • 2,535
  • 7
  • 30
  • 42

0 Answers0