{"rsdb":{"rid":"239123","subhead":"","postdate":"0","aid":"164828","fid":"98","uid":"1","topic":"1","content":"
\n

ACTION_PACKAGE_ADDED \u4e00\u4e2a\u65b0\u5e94\u7528\u5305\u5df2\u7ecf\u5b89\u88c5\u5728\u8bbe\u5907\u4e0a\uff0c\u6570\u636e\u5305\u62ec\u5305\u540d\uff08\u6700\u65b0\u5b89\u88c5\u7684\u5305\u7a0b\u5e8f\u4e0d\u80fd\u63a5\u6536\u5230\u8fd9\u4e2a\u5e7f\u64ad\uff09
ACTION_PACKAGE_REPLACED \u4e00\u4e2a\u65b0\u7248\u672c\u7684\u5e94\u7528\u5b89\u88c5\u5230\u8bbe\u5907\uff0c\u66ff\u6362\u4e4b\u524d\u5df2\u7ecf\u5b58\u5728\u7684\u7248\u672c
ACTION_PACKAGE_REMOVED \u4e00\u4e2a\u5df2\u5b58\u5728\u7684\u5e94\u7528\u7a0b\u5e8f\u5305\u5df2\u7ecf\u4ece\u8bbe\u5907\u4e0a\u79fb\u9664\uff0c\u5305\u62ec\u5305\u540d\uff08\u6b63\u5728\u88ab\u5b89\u88c5\u7684\u5305\u7a0b\u5e8f\u4e0d\u80fd\u63a5\u6536\u5230\u8fd9\u4e2a\u5e7f\u64ad\uff09<\/p> \n

\n
\n \"\u590d\u5236\u4ee3\u7801\"<\/a><\/span>\n <\/div> \n
public class AppInstallReceiver extends BroadcastReceiver {\n\n    @Override\n    public void onReceive(Context context, Intent intent) {\n        PackageManager manager = context.getPackageManager();\n        if (intent.getAction().equals(Intent.ACTION_PACKAGE_ADDED)) {\n            String packageName = intent.getData().getSchemeSpecificPart();\n            Toast.makeText(context, "\u5b89\u88c5\u6210\u529f"+packageName, Toast.LENGTH_LONG).show();\n        }\n        if (intent.getAction().equals(Intent.ACTION_PACKAGE_REMOVED)) {\n            String packageName = intent.getData().getSchemeSpecificPart();\n            Toast.makeText(context, "\u5378\u8f7d\u6210\u529f"+packageName, Toast.LENGTH_LONG).show();\n        }\n        if (intent.getAction().equals(Intent.ACTION_PACKAGE_REPLACED)) {\n            String packageName = intent.getData().getSchemeSpecificPart();\n            Toast.makeText(context, "\u66ff\u6362\u6210\u529f"+packageName, Toast.LENGTH_LONG).show();\n        }\n        \n\n    }\n\n}<\/pre> \n <\/div>\n<\/div>","orderid":"0","title":"Android \u76d1\u542cAPK\u5378\u8f7d\uff0c\u66ff\u6362\uff0c\u5b8c\u6210\u7684\u5e7f\u64ad","smalltitle":"","mid":"0","fname":"Android","special_id":"0","bak_id":"0","info":"0","hits":"6040","pages":"1","comments":"0","posttime":"2017-10-16 18:18:41","list":"1508149121","username":"admin","author":"","copyfrom":"","copyfromurl":"","titlecolor":"","fonttype":"0","titleicon":"0","picurl":"http:\/\/common.cnblogs.com\/images\/copycode.gif","ispic":"1","yz":"1","yzer":"","yztime":"0","levels":"0","levelstime":"0","keywords":"Android<\/A> \u76d1\u542c<\/A> APK<\/A> \u5378\u8f7d<\/A> \u66ff\u6362<\/A> \u5b8c\u6210<\/A> \u5e7f\u64ad<\/A>","jumpurl":"","iframeurl":"","style":"","template":"a:3:{s:4:\"head\";s:0:\"\";s:4:\"foot\";s:0:\"\";s:8:\"bencandy\";s:0:\"\";}","target":"0","ip":"113.108.110.181","lastfid":"0","money":"0","buyuser":"","passwd":"","allowdown":"","allowview":"","editer":"","edittime":"0","begintime":"0","endtime":"0","description":"Android \u76d1\u542cAPK\u5378\u8f7d\uff0c\u66ff\u6362\uff0c\u5b8c\u6210\u7684\u5e7f\u64ad","lastview":"1714074630","digg_num":"5039","digg_time":"0","forbidcomment":"0","ifvote":"0","heart":"","htmlname":"","city_id":"0"},"page":"1"}