installed-applications

How to get the list of apps that have been installed by a user on an Android device?

独自空忆成欢 提交于 2019-11-27 18:37:02
I am using the following piece of code at the moment: List<PackageInfo> packs = getPackageManager().getInstalledPackages(0); but it returns Apps that have been installed by the both device manufacturer and me. How to limit it so that only the apps that I installed are returned? Zelimir // Flags: See below int flags = PackageManager.GET_META_DATA | PackageManager.GET_SHARED_LIBRARY_FILES | PackageManager.GET_UNINSTALLED_PACKAGES; PackageManager pm = getPackageManager(); List<ApplicationInfo> applications = pm.getInstalledApplications(flags); for (ApplicationInfo appInfo : applications) { if (

PackageManager.getInstalledPackages() returns empty list

偶尔善良 提交于 2019-11-26 21:56:32
问题 I am running into a very strange situation when using the PackageManager.getInstalledPackages() method. The first time I launch my activity I get a valid list of all the installed packages. But the second time I launch my activity I get an empty list... What could possibly be causing this? I am using this code to get the list: List pkgList = getPackageManager().getInstalledPackages(PackageManager.GET_ACTIVITIES); I am building against the 1.6 SDK with compatibility for 1.5+ Thanks in advance

How to get the list of apps that have been installed by a user on an Android device?

♀尐吖头ヾ 提交于 2019-11-26 19:31:33
问题 I am using the following piece of code at the moment: List<PackageInfo> packs = getPackageManager().getInstalledPackages(0); but it returns Apps that have been installed by the both device manufacturer and me. How to limit it so that only the apps that I installed are returned? 回答1: // Flags: See below int flags = PackageManager.GET_META_DATA | PackageManager.GET_SHARED_LIBRARY_FILES | PackageManager.GET_UNINSTALLED_PACKAGES; PackageManager pm = getPackageManager(); List<ApplicationInfo>

Detecting programmatically whether an app is installed on iPhone

僤鯓⒐⒋嵵緔 提交于 2019-11-26 18:47:30
I am in this situation where I have to display a button which says "Open myApp" (if myApp is installed on the device) or it says "Download myApp" (if myApp is not installed on the device) in an iphone app. To do this, I need to detect whether an app (with a known custom URL) has been installed on the device. How can I do this? Thanks in advance. UPDATED 8th January 2014 - 3 things you can do I actually had to do this for a client again. They wanted users to be able to open their second app from the main app if it had been installed. This is my finding. Use the canOpenURL method to check if an

Detecting programmatically whether an app is installed on iPhone

旧时模样 提交于 2019-11-26 06:37:38
问题 I am in this situation where I have to display a button which says \"Open myApp\" (if myApp is installed on the device) or it says \"Download myApp\" (if myApp is not installed on the device) in an iphone app. To do this, I need to detect whether an app (with a known custom URL) has been installed on the device. How can I do this? Thanks in advance. 回答1: UPDATED 8th January 2014 - 3 things you can do I actually had to do this for a client again. They wanted users to be able to open their