Failed to start com.parse.ParseBroadcastReceiver receiver in Trigger.io Android app

I have an Android application created using trigger.io using parsing alerts. The app is deployed to play on Google, and push notifications work fine. Recently redesigned and deployed on Google Play a new version of the application with the Forge platform version 1.4.29.

Since then, I have received the following crash reports on Google Play:

java.lang.RuntimeException: Unable to start receiver com.parse.ParseBroadcastReceiver: android.content.ReceiverCallNotAllowedException: IntentReceiver components are not allowed to register to receive intents at android.app.ActivityThread.handleReceiver(ActivityThread.java:2236) at android.app.ActivityThread.access$1500(ActivityThread.java:130) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1271) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4745) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at dalvik.system.NativeStart.main(Native Method) Caused by: android.content.ReceiverCallNotAllowedException: IntentReceiver components are not allowed to register to receive intents at android.app.ReceiverRestrictedContext.registerReceiver(ContextImpl.java:125) at android.app.ReceiverRestrictedContext.registerReceiver(ContextImpl.java:119) at com.parse.ParseCommandCache.<init>(ParseCommandCache.java:132) at com.parse.Parse.getCommandCache(Parse.java:450) at com.parse.ParseObject.saveEventually(ParseObject.java:1022) at com.parse.ParseInstallation.saveEventually(ParseInstallation.java:170) at com.parse.ParsePushRouter.saveEventually(ParsePushRouter.java:92) at com.parse.ParsePushRouter.ensureStateIsLoaded(ParsePushRouter.java:208) at com.parse.ParsePushRouter.hasRoutes(ParsePushRouter.java:122) at com.parse.PushService.startServiceIfRequired(PushService.java:129) at com.parse.ParseBroadcastReceiver.onReceive(ParseBroadcastReceiver.java:19) at android.app.ActivityThread.handleReceiver(ActivityThread.java:2229) ... 10 more 

I fully tested the application on the following Android phones and could not reproduce the error myself.

  • Samsung Galaxy Nexus
  • Samsung Galaxy S2
  • Samsung Galaxy S

Can anyone suggest what is going wrong here and how can I fix this with Trigger.io?

+4
source share
3 answers

This issue was fixed in Forge v1.4.37, which included an update for Parse Android SDK v1.2.3.

+1
source

I recently ran into this problem and had nothing to do with the Parse version. The problem was that Parse initialization was done on Activity instead of Application. The broadcast receiver can start before Activity and write its own application class and initialize Parse in onCreate. It helps.

 public class MyApplication extends Application { @Override public void onCreate() { super.onCreate(); //Initialize Parse here } } <application android:name=".MyApplication" ...> . . . </application> 
0
source

This issue is resolved in Forge v1.4.32: http://docs.trigger.io/en/v1.4/release-notes.html#v1-4-32

-1
source

All Articles