Proceedings:
I am using push notifications to send message
Device is getting registered in Web-Engage
When I send a push notification to a device, Status on the console is
seen as 'ENDED'
Finally push notification is not received on device
Error on Console:
APP_ID_MISMATCH
Manifest web-engage code:
<receiver
android:name="com.webengage.sdk.android.WebEngagePushReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
<category android:name="${applicationId}"/>
</intent-filter>
</receiver>
<service android:name="com.bakmi.app.service.MyFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<meta-data
android:name="com.webengage.sdk.android.project_number"
android:value="$102353245239034"/>
<meta-data
android:name="com.webengage.sdk.android.key"
android:value="#string/ACCOUNT_ID"/>
<meta-data
android:name="com.webengage.sdk.android.auto_gcm_registration"
android:value="true"/>
<meta-data
android:name="com.webengage.sdk.android.location_tracking"
android:value="false"/>
<meta-data
android:name="com.webengage.sdk.android.debug"
android:value="true"/>
<service android:name="com.webengage.sdk.android.ExecutorService"/>
<service android:name="com.webengage.sdk.android.EventLogService"/>
<receiver
android:name="com.webengage.sdk.android.WebEngageReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
<action android:name="com.webengage.sdk.android.intent.ACTION"/>
<category android:name="com.bakmi.loyalty"/>
</intent-filter>
</receiver>
<receiver
android:name="com.webengage.sdk.android.InstallTracker"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER"/>
</intent-filter>
</receiver>
APP_ID_MISMATCH is fired in one of the two cases:
1. If the package name of the receiving app is not the one to which the push was sent from our server, i.e. your app's package-name is different from the package-name entered in WebEngage dashboard.
2. If the GCM/FCM token to which the push was sent is not tied to the server key i.e. sever key entered in WebEngage dashboard is not from the GCM/FCM project which is integrated in the App.
Apart from this, your FCM push integration seems to be mixed up with GCM push integration.
It is recommended to use FCM for push notifications and remove the following GCM related tags from your AndroidManifest.xml file.
<!-- remove these tags
<receiver
android:name="com.webengage.sdk.android.WebEngagePushReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
<category android:name="${applicationId}"/>
</intent-filter>
</receiver>
<meta-data
android:name="com.webengage.sdk.android.project_number"
android:value="$102353245239034"/>
<meta-data
android:name="com.webengage.sdk.android.auto_gcm_registration"
android:value="true"/>
-->
Related
I'm planning to add the notification functionality to my android app, I added GCM through Google Developer Console and I got the API key and I used this key at the server side to send notifications to devices, however my GCM receiver is not working I don't know why, moreover, GCM is not present in my google-services.json.Apart from this, I also sent my device token to the server and it's sent successfully.
I cannot find a clue why I'm not receiving my notifications.
Here's my manifest code:
<permission
android:name="com.example.android.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission
android:name="com.example.android.permission.C2D_MESSAGE" />
<!--Services-->
<!--Service for retrieving device token and sending it to the server side-->
<service
android:name=".utils.RegistrationIntentService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<!--Service for checking updated device token-->
<service
android:name=".utils.GCMInstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<!--Service to catch notifications sent from the server-->
<service
android:name=".utils.GcmMessageHandler"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<!--Receivers-->
<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.REGISTRATION" />
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.example.android.utils" />
</intent-filter>
</receiver>
I have been getting two errors in my log once a notification is received
EnhancedIntentService: Service took too long to process intent: com.google.android.c2dm.intent.RECEIVE App may get closed
EnhancedIntentService: binding to the service failed
There is NOTHING on Google of either of these messages or even EnhancedIntentService.
Relevant code:
<service
android:name="---.GcmMCIntentService"
android:exported="false" >
<intent-filter android:priority="10">
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<service
android:name="---.GCMInstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<service android:name="---.GCMRegIntentService"
android:exported="false" >
<intent-filter android:priority="5">
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
This is on a 8.0 emulator. Play Services 11.4.2
Let me know if I can show any other code. I just find it curious there is nothing on these error messages at all on S.O. or Google.
We are using Parse Push Plugin https://github.com/taivo/parse-push-plugin with custom parse server. Push messages are coming to the device into GCMService but not rendering. The ParsePushBroadcastReceiver not sure if its being invoked. I don't see any errors in logs.
Also on debugging i see that GCM Receive Intent's are getting called, and not
com.parse.push.intent.RECEIVE , not sure if its default behaviour.
I have the following in AndroidManifest.xml , Also i am using parse android version com.parse:parse-android:1.13.1
<receiver android:exported="false" android:name="github.taivo.parsepushplugin.ParsePushPluginReceiver">
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
<receiver android:name="com.parse.GcmBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
Any help would be of greatly appreciated
I followed the instructions here to set up a client GCM app: https://developers.google.com/cloud-messaging/android/client
I opted to use the standard GCM rather than the new Firebase Cloud Messaging, for now.
My app server is a node.js instance using node-gcm to send push notifications.
My app receives the notifications successfully, however prints out the following errors:
E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.
Here are the relevant bits of my AndroidManifest.xml:
<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" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.example.myapp" />
</intent-filter>
</receiver>
<service
android:name="com.example.myapp.gcm.GcmListener"
android:exported="false" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<service
android:name="com.example.myapp.gcm.InstanceIDListener"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<service android:name="com.example.myapp.gcm.RegistrationIntentService"
android:exported="false" />
My project has all of the above classes (minus GcmReceiver which is provided by Google).
GcmReceiver extends GcmListenerService
InstanceIDListener extends InstanceIDListenerService
RegistrationIntentService extends IntentService
Am I missing anything that might be causing this error? Does the error actually affect anything?
I have an android game, which I integrated with Google Analytics. I "think" my phone doesn't have google services installed, but documentation says that it should work.
I have this in my manifesto
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<!-- Optionally, register AnalyticsReceiver and AnalyticsService to support background
dispatching on non-Google Play devices -->
<receiver android:name="com.google.android.gms.analytics.AnalyticsReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
</intent-filter>
</receiver>
<service android:name="com.google.android.gms.analytics.AnalyticsService"
android:enabled="true"
android:exported="false">
</service>
<!-- Optionally, register CampaignTrackingReceiver and CampaignTrackingService to enable
installation campaign reporting -->
<receiver android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<service android:name="com.google.android.gms.analytics.CampaignTrackingService" />
but I get the log message complaining that :
AnalyticsService not registered in the app manifest. Hits might not be delivered reliably. See http://goo.gl/8Rd3yj for instructions.
And I don't get any hits on the console of google analytics.
Please help!