2013-02-11 19 views
4

我有一个使用Parse推送通知使用trigger.io构建的Android应用。 应用程序部署到谷歌播放和推送通知一直工作正常。最近重新构建并部署到谷歌播放应用程序的新版本,Forge平台版本1.4.29。无法在Trigger.io上启动接收器com.parse.ParseBroadcastReceiver Android应用

从那时起,我已经收到通过谷歌播放以下崩溃报告:

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解决这个问题?

+0

您是否正在使用最新的SDK。我相信这是一个最近更新中解决的Parse错误。 – 2013-02-12 18:36:54

+0

我使用的是1.1.11,在此处更新日志中列出了最新版本https://parse.com/docs/downloads – Meirion 2013-02-12 20:59:50

+0

Trigger.IO的官方答案在此处非常有用。 – Meirion 2013-02-22 09:36:32

回答

-1

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

+1

更新到v1.4.32后,我们的一些用户仍然遇到了一个稍有不同的堆栈跟踪的崩溃。它以'java.lang.RuntimeException开始:执行doInBackground()'时发生错误。尽管它似乎影响较少的用户,但崩溃的数量仍然惊人地高。以下是Parse论坛中的相关报告:https://parse.com/questions/androidcontentreceivercallnotallowedexception-when-registering-for-push-notifications – 2013-03-14 08:44:53

+0

我现在也在接收这些新的堆栈跟踪'java.lang.RuntimeException:An执行doInBackground()'时发生错误 – Meirion 2013-03-14 15:16:11

0

最近,我有这个问题,并没有任何关系解析版本。问题是Parse的初始化是在Activity而不是Application上完成的。 Broadcast Receiver可以在Activity之前启动并编写一个自定义的Application类并在onCreate中初始化Parse。

public class MyApplication extends Application { 
    @Override 
    public void onCreate() { 
     super.onCreate(); 
     //Initialize Parse here 
    } 
} 



<application 
     android:name=".MyApplication" 
...> 
. 
. 
. 
</application> 
相关问题