Broadcast receiver not receiving intent

前端 未结 2 1344
没有蜡笔的小新
没有蜡笔的小新 2021-01-31 13:05

I have two apps that I have complete control over. Both are signed with the same cert and both use the exact same intent filter. One sends the broadcast from a fragment, the o

2条回答
  •  逝去的感伤
    2021-01-31 13:40

    As Android Addict says in his comment to David Wasser's answer ... there is a way around this behaviour.

    Just add the following flag to the calling Intent. This will ensure that you also reach broadcast receivers from "stopped" applications.

    http://developer.android.com/reference/android/content/Intent.html#FLAG_INCLUDE_STOPPED_PACKAGES

    You can read more about this Android 3.1 change here

    http://developer.android.com/about/versions/android-3.1.html#launchcontrols

    and here

    http://code.google.com/p/android/issues/detail?id=18225

提交回复
热议问题