Skip to main content
Added an update regarding new data
Source Link
Bill Mote
  • 5.5k
  • 1
  • 12
  • 16

UPDATE 20170211: Verified per the comment in the original question -- this problem has been resolved in version 4.8.4 of the SDK.

If you are using a version < 4.8.4 please see:

What version of the SDK are you using?

What version of the SDK are you using?

UPDATE 20170211: Verified per the comment in the original question -- this problem has been resolved in version 4.8.4 of the SDK.

If you are using a version < 4.8.4 please see:

What version of the SDK are you using?

added 25 characters in body
Source Link
Bill Mote
  • 5.5k
  • 1
  • 12
  • 16

What version of the SDK are you using?

There is an issue with Google GcmReceiver.class in which they look for the service at index(0).

Can you please try manually providing the ETPushService definition in your AndroidManifest.xml and ensure that it is declared before any other service?

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

You can see by the logs that the Receiver is being called, but it never hands off to our Service.

Here is the code in question:

private void zzk(Context var1, Intent var2) { ResolveInfo var3 = var1.getPackageManager().resolveService(var2, 0); if(var3 != null && var3.serviceInfo != null) { ServiceInfo var4 = var3.serviceInfo; if(var1.getPackageName().equals(var4.packageName) && var4.name != null) { String var5 = var4.name; var5 = var5.startsWith(".")?var1.getPackageName() + var5:var5; if(Log.isLoggable("GcmReceiver", 3)) { Log.d("GcmReceiver", "Restricting intent to a specific service: " + var5); } var2.setClassName(var1.getPackageName(), var5); } else { Log.e("GcmReceiver", "Error resolving target intent service, skipping classname enforcement. Resolved service was: " + var4.packageName + "/" + var4.name); } } else { Log.e("GcmReceiver", "Failed to resolve target intent service, skipping classname enforcement"); } } 

If you wish to debug further you can do one of the following to determine what service is being called:

System.setProperty("log.tag.GcmReceiver", "VERBOSE"); 

-or-

16:24:50 [bmote@in7277 EtPushHelloWorld]$ adb shell setprop log.tag.GcmReceiver VERBOSE 

As a result I can see this for my test app (note, however, that my app does not experience this problem and directs to the correct service):

03-28 16:43:35.538 32627-32627/com.example.helloworld D/GcmReceiver: Restricting intent to a specific service: com.exacttarget.etpushsdk.ETPushService 

What version of the SDK are you using?

There is an issue with Google GcmReceiver.class in which they look for the service at index(0).

Can you please try manually providing the ETPushService definition in your AndroidManifest.xml and ensure that it is declared before any other service?

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

You can see by the logs that the Receiver is being called, but it never hands off to our Service.

Here is the code in question:

private void zzk(Context var1, Intent var2) { ResolveInfo var3 = var1.getPackageManager().resolveService(var2, 0); if(var3 != null && var3.serviceInfo != null) { ServiceInfo var4 = var3.serviceInfo; if(var1.getPackageName().equals(var4.packageName) && var4.name != null) { String var5 = var4.name; var5 = var5.startsWith(".")?var1.getPackageName() + var5:var5; if(Log.isLoggable("GcmReceiver", 3)) { Log.d("GcmReceiver", "Restricting intent to a specific service: " + var5); } var2.setClassName(var1.getPackageName(), var5); } else { Log.e("GcmReceiver", "Error resolving target intent service, skipping classname enforcement. Resolved service was: " + var4.packageName + "/" + var4.name); } } else { Log.e("GcmReceiver", "Failed to resolve target intent service, skipping classname enforcement"); } } 

If you wish to debug further you can do one of the following to determine what service is being called:

System.setProperty("log.tag.GcmReceiver", "VERBOSE"); 

-or-

16:24:50 [bmote@in7277 EtPushHelloWorld]$ adb shell setprop log.tag.GcmReceiver VERBOSE 

As a result I can see this for my test app (note, however, that my app does not experience this problem and directs to the correct service):

03-28 16:43:35.538 32627-32627/com.example.helloworld D/GcmReceiver: Restricting intent to a specific service: com.exacttarget.etpushsdk.ETPushService 

What version of the SDK are you using?

There is an issue with Google GcmReceiver.class in which they look for the service at index(0).

Can you please try manually providing the ETPushService definition in your AndroidManifest.xml and ensure that it is declared before any other service?

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

You can see by the logs that the Receiver is being called, but it never hands off to our Service.

Here is the code in question:

private void zzk(Context var1, Intent var2) { ResolveInfo var3 = var1.getPackageManager().resolveService(var2, 0); if(var3 != null && var3.serviceInfo != null) { ServiceInfo var4 = var3.serviceInfo; if(var1.getPackageName().equals(var4.packageName) && var4.name != null) { String var5 = var4.name; var5 = var5.startsWith(".")?var1.getPackageName() + var5:var5; if(Log.isLoggable("GcmReceiver", 3)) { Log.d("GcmReceiver", "Restricting intent to a specific service: " + var5); } var2.setClassName(var1.getPackageName(), var5); } else { Log.e("GcmReceiver", "Error resolving target intent service, skipping classname enforcement. Resolved service was: " + var4.packageName + "/" + var4.name); } } else { Log.e("GcmReceiver", "Failed to resolve target intent service, skipping classname enforcement"); } } 

If you wish to debug further you can do one of the following to determine what service is being called:

System.setProperty("log.tag.GcmReceiver", "VERBOSE"); 

-or-

16:24:50 [bmote@in7277 EtPushHelloWorld]$ adb shell setprop log.tag.GcmReceiver VERBOSE 

As a result I can see this for my test app (note, however, that my app does not experience this problem and directs to the correct service):

03-28 16:43:35.538 32627-32627/com.example.helloworld D/GcmReceiver: Restricting intent to a specific service: com.exacttarget.etpushsdk.ETPushService 
Source Link
Bill Mote
  • 5.5k
  • 1
  • 12
  • 16

What version of the SDK are you using?

There is an issue with Google GcmReceiver.class in which they look for the service at index(0).

Can you please try manually providing the ETPushService definition in your AndroidManifest.xml and ensure that it is declared before any other service?

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

You can see by the logs that the Receiver is being called, but it never hands off to our Service.

Here is the code in question:

private void zzk(Context var1, Intent var2) { ResolveInfo var3 = var1.getPackageManager().resolveService(var2, 0); if(var3 != null && var3.serviceInfo != null) { ServiceInfo var4 = var3.serviceInfo; if(var1.getPackageName().equals(var4.packageName) && var4.name != null) { String var5 = var4.name; var5 = var5.startsWith(".")?var1.getPackageName() + var5:var5; if(Log.isLoggable("GcmReceiver", 3)) { Log.d("GcmReceiver", "Restricting intent to a specific service: " + var5); } var2.setClassName(var1.getPackageName(), var5); } else { Log.e("GcmReceiver", "Error resolving target intent service, skipping classname enforcement. Resolved service was: " + var4.packageName + "/" + var4.name); } } else { Log.e("GcmReceiver", "Failed to resolve target intent service, skipping classname enforcement"); } } 

If you wish to debug further you can do one of the following to determine what service is being called:

System.setProperty("log.tag.GcmReceiver", "VERBOSE"); 

-or-

16:24:50 [bmote@in7277 EtPushHelloWorld]$ adb shell setprop log.tag.GcmReceiver VERBOSE 

As a result I can see this for my test app (note, however, that my app does not experience this problem and directs to the correct service):

03-28 16:43:35.538 32627-32627/com.example.helloworld D/GcmReceiver: Restricting intent to a specific service: com.exacttarget.etpushsdk.ETPushService