android包重启广播无法正常工作 [英] android package restarted broadcast not working

查看:166
本文介绍了android包重启广播无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个需要在每次打开应用程序时进行广播的应用程序.我已经在清单中这样注册接收者.

I am developing an app which needs a broadcast when app opens every time. I had registered the receiver in manifest like this.

<receiver android:name="package.broadcast.example" >
    <intent-filter>
        <action android:name="android.intent.action.PACKAGE_RESTARTED" />
        <data android:scheme="package"/>
    </intent-filter>
</receiver>

但是我无法接收广播.我花了3个小时,仍然找不到错误的答案.任何人都可以向我介绍此广播的工作示例.谢谢.

But i cant able to receive the broadcast. I spent 3 hours on this still i cant find wats the mistake. Can anyone refer me the working example of this broadcast. Thanks.

推荐答案

重新启动的应用程序/程序包未收到广播...

Restarted Application/Package does not receive broadcast...

查看以下链接以获取详细信息 您可以检查此链接

check the following link for details you can check this link

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

这篇关于android包重启广播无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆