PACKAGE_REMOVED & then PACKAGE_ADDED are fired along with PACKAGE_REPLACED Intent Action

后端 未结 1 1069
谎友^
谎友^ 2020-12-23 22:02

All I am trying to do is update my list on each Install & Uninstall but not on Package Replace .So the main problem is that Install & Uninstall inte

相关标签:
1条回答
  • 2020-12-23 22:32

    Just check intent.getBooleanExtra(Intent.EXTRA_REPLACING, false):

    if (!intent.getAction().equals(Intent.ACTION_PACKAGE_REPLACED) &&
        intent.getBooleanExtra(Intent.EXTRA_REPLACING, false))
        return;
    
    0 讨论(0)
提交回复
热议问题