1

We have a service which extends GcmTaskService and declared that as a service in an AndroidManifest as

<service
        android:exported="true"
        android:name=".MyService"
        android:permission="com.google.android.gms.permission.BIND_NETWORK_TASK_SERVICE">
        <intent-filter>
            <action android:name="com.google.android.gms.gcm.ACTION_TASK_READY">
            </action>
        </intent-filter>
    </service>

When i have this service Exact Target EtPush Service doesn't post the registration event but when i remove this service the registration works so i am assuming that our service is blocking your ETPushService which shouldn't happen.

1

ETPushService extends GcmReceiver (by Google). In GcmReceiver there is code that looks for services and executes against the service found at index 0. I have filed a bug report for this, but there is no fix.

Workaround:

Manually define the ETPushService in your manifest and ensure it appears before any other service.

<service
    android:name="com.exacttarget.etpushsdk.etsdk.ETPushService"
    android:exported="false">
    <intent-filter>
        <action android:name="com.google.android.c2dm.intent.RECEIVE" />
    </intent-filter>
</service>

This will not affect any of your other services as this will only be called when a push message is received.

  • Okay i added this service but seems like my app now crashes with exception Suppressed: java.lang.ClassNotFoundException: com.exacttarget.etpushsdk.etsdk.ETPushService – Manas Prasher Sep 23 '16 at 15:13
  • 1
    Never mind the class name was wrong now its working thanks – Manas Prasher Sep 23 '16 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.