Member-only story
Exploring Package Visibility in Android
How to get the list of apps installed on the device — a solution that works on all Android versions
5 min readDec 28, 2022
Introduction
In this article, we’ll explore different ways to get the list of installed applications on a device inside our app. Then explore different restrictions imposed on the approaches by the android team in the last couple of years. Finally, at end of the article let’s check the right approach based on the use case.
Before getting into the how part, let’s discuss why. Why does any app need the list of all or sub-set(with particular criteria) of apps installed on the device?
- For a particular subset of apps, the use case might be when developers need to open an URL with available browser apps installed on the device. Usually, this can be achieved by the share bottom sheet. But if the developers want to show the list of apps with a custom UI then developers should have access to the installed browser apps. Similarly to open specific apps to view images or PDF documents, etc from our app.
- The other use-case is to get all the installed apps, which is not so common in our day-to-day tasks. From my personal experience, this use case might be when our app offers a service that can run on top of other apps…