【发布时间】:2014-08-28 12:21:12
【问题描述】:
这是我的接收器类的一部分:
Uri dataURI = intent.getData();
String appPackage = (dataURI != null ? dataURI.getSchemeSpecificPart() : null);
if (action.equals(Intent.ACTION_PACKAGE_ADDED)) {
UpdateUserGamesService.ACTION_PACKAGE_ADDED;
}
else if (action.equals(Intent.ACTION_PACKAGE_REMOVED)) {
UpdateUserGamesService.ACTION_PACKAGE_REMOVED;
}
它运作良好。有没有办法获取应用程序名称而不仅仅是包名称?
【问题讨论】:
-
我正在尝试获取第 3 方应用程序名称,而不是我自己的应用程序。
-
如标题所述,问题出在被移除者身上。
-
在添加时获得名称后,您可以使用持久存储在以后检索名称。
标签: android android-intent broadcastreceiver