我们有Android应用,可检测设备上是否已安装或卸载应用。 借助清单文件的帮助,如下所示:
<action android:name="android.intent.action.PACKAGE_INSTALL"/>
<action android:name="android.intent.action.PACKAGE_ADDED"/>
<action android:name="android.intent.action.PACKAGE_REMOVED"/>
Android应用接收来自内部系统的广播并将其发送到我们的服务器。
但是在API 26之后,Android OS不再广播Package_Installed。
任何人都知道在API操纵杆26之后如何检测应用安装。
答案 0 :(得分:1)
面向Android 8.0或更高版本的应用无法再在其清单中为隐式广播注册广播接收器。如果应用向Context.registerReceiver()注册了自己的BroadcastReceiver,并且该上下文仍然有效,则它们仍将接收广播。
https://developer.android.com/about/versions/oreo/background#broadcasts