【问题标题】:Unable to start receiver com.parse.ParseBroadcastReceiver on Trigger.io Android app无法在 Trigger.io Android 应用上启动接收器 com.parse.ParseBroadcastReceiver
【发布时间】:2013-02-11 12:19:35
【问题描述】:

我有一个用 trigger.io 构建的 Android 应用,使用 Parse 推送通知。 应用程序已部署到 google play,并且推送通知运行良好。最近重新构建并部署到 google play 新版本的应用程序,Forge 平台版本为 1.4.29。

从那时起,我通过 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

我已在以下 Android 手机上彻底测试了该应用程序,但我自己无法复制该错误。

  • 三星 Galaxy Nexus
  • 三星 Galaxy S2
  • 三星 Galaxy S

有人可以建议这里出了什么问题以及如何使用 Trigger.io 解决它吗?

【问题讨论】:

  • 您使用的是最新的 SDK。我相信这是一个 Parse 错误,已在最近的更新中修复。
  • 我使用的是 1.1.11,在此处的更新日志中列为最新版本 parse.com/docs/downloads
  • Trigger.IO 的官方回答在这里很有用。
  • 能否将您的应用配置和示例代码发送至 support@trigger.io?
  • 好的,刚刚发了一条消息。

标签: android push-notification trigger.io parse-platform


【解决方案1】:

此问题已在 Forge v1.4.37 中得到修复,其中包括对 Parse Android SDK v1.2.3 的更新。

【讨论】:

    【解决方案2】:

    最近我遇到了这个问题,与 Parse 版本无关。问题是 Parse 的初始化是在 Activity 而不是 Application 上完成的。广播接收器可以在 Activity 之前启动并编写自定义应用程序类并在 onCreate 中初始化 Parse 有帮助。

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

    【讨论】:

      【解决方案3】:

      这个问题在 Forge v1.4.32 中得到解决: http://docs.trigger.io/en/v1.4/release-notes.html#v1-4-32

      【讨论】:

      • 更新到 v1.4.32 后,我们的一些用户仍然遇到崩溃,堆栈跟踪略有不同。它以java.lang.RuntimeException: An error occured while executing doInBackground() 开头。尽管它似乎影响的用户较少,但崩溃的数量仍然高得惊人。以下是 Parse 论坛中的相关报告:parse.com/questions/…
      • 我现在也收到了这些新的堆栈跟踪java.lang.RuntimeException: An error occured while executing doInBackground()
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多