【问题标题】:How can I check an app is now uninstalled?如何检查应用程序现在是否已卸载?
【发布时间】:2014-11-07 18:11:07
【问题描述】:

点击卸载按钮后如何检查应用是否已卸载? 卸载应用程序后我想删除适配器 我使用adapter.remove(item),但即使我取消卸载,我的适配器也被移除了

if(condition for an uninstalled app){
  adapter.remove(item);
}

【问题讨论】:

    标签: android uninstallation


    【解决方案1】:

    要知道应用何时被卸载,只需在ACTION_PACKAGE_REMOVED 上注册BroadcastReceiver

    请注意,这仅用于收到有关删除其他应用的通知,不是您自己的,如文档所述:

    正在安装的包没有收到这个 Intent。

    【讨论】:

      猜你喜欢
      • 2016-03-23
      • 1970-01-01
      • 2019-01-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多