我想创建这样一个服务,它在任何新应用程序安装在 android 设备上时启动。那么如何知道任何应用程序安装在 android 设备中,是否有任何 Intent 事件被触发?
问问题
150 次
1 回答
5
<receiver android:name="r1">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED"/> <data android:scheme="package"/>
</intent-filter>
</receiver>
你可以试试这个广播接收器....
也经过
"android.intent.action.PACKAGE_REMOVED"
"android.intent.action.PACKAGE_REPLACED"
可能会派上用场...
于 2012-03-19T07:26:11.770 回答