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
Related
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"/>
-->
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.
Baidu provide android SDK for push notification in eclipse project. It run well but no in android studio. I get errorCode 10101 (Integrate Check Error) Anyone know ?
Error 10101 indicated that there's something wrong with the core libs of baidu push services. From what i've experienced, it usually means that one of the .so libraries isn't loaded right, or isn't correlate with your definitions. For example, if you have a device which goes to armeabi-v7a folder, and the libbdpush_.so file there isn't right, then that device won't be able to connect to baidu's push services.
Baidu's guide : http://push.baidu.com/doc/android/api
Have you imported all the required libraries and made all the configurations ?
If you've made all the following steps, and still, you're receiving error 10101 it means that the specific phone you have doesn't have the right .so lib under its correlate core lib folder.
Download the baidu sdk http://boscdn.bpc.baidu.com/channelpush/14/dZoOygdDPxB7SecReFnwNDDG/com.neura.weave/PushDemo.zip
Import the core libs (PushDemo -> libs) to your project (project -> src -> main -> jniLibs)
Import the push service library (pushservice-_.jar) to your project (project -> libs)
Adjust your manifest
<receiver
android:name="com.baidu.android.pushservice.PushServiceReceiver"
android:process=":bdservice_v1">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<action android:name="com.baidu.android.pushservice.action.notification.SHOW" />
<action android:name="com.baidu.android.pushservice.action.media.CLICK" />
<action android:name="android.intent.action.MEDIA_MOUNTED" />
<action android:name="android.intent.action.USER_PRESENT" />
<action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
</intent-filter>
</receiver>
<receiver
android:name="com.baidu.android.pushservice.RegistrationReceiver"
android:process=":bdservice_v1">
<intent-filter>
<action android:name="com.baidu.android.pushservice.action.METHOD" />
<action android:name="com.baidu.android.pushservice.action.BIND_SYNC" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
<service
android:name="com.baidu.android.pushservice.PushService"
android:exported="true"
android:process=":bdservice_v1">
<intent-filter>
<action android:name="com.baidu.android.pushservice.action.PUSH_SERVICE" />
</intent-filter>
</service>
<service
android:name="com.baidu.android.pushservice.CommandService"
android:exported="true" />
<meta-data
android:name="api_key"
android:value="put_your_baidu_api_key_here" />
After i turn on my phone, my app crashes and does not open after that.
It just crashed although it is not open.
I don't know what the error because it appears after i turn on my phone and the logcat cannot monitor the phone and i don't see any error.
Receivers:
<receiver
android:name=".AlarmReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver
android:name=".ActionReceiver"
android:enabled="true" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>