7 ms·
Under Android, it's possible to get a list of all installed applications by querying the packageManager: https://developer.android.com/reference/android/content
by JosephRedfern 12y ago
Under Android, it's possible to get a list of all installed applications by querying the packageManager: https://developer.android.com/reference/android/content/pm/PackageManager.html#queryIntentActivities(android.content.Intent https://developer.android.com/reference/android/content/pm/P..., int), rather than "brute-forcing" known URL schemes. This doesn't require any special permissions.
- onion2k 12y agoDoing it this way means it'll work on iOS and Android, and it'll continue to work if the installed applications API is ever removed or blocked by a permission. Using the URL scheme essentially can't be blocked because it's necessary for inter-app comms.
- userbinator 12y agoUsing the URL scheme essentially can't be blocked because it's necessary for inter-app comms. It could be blocked via a permission as well (and just look like the target app is not installed.)