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

Satya Pavan Kantamani
5 min readDec 28, 2022
Photo by Rami Al-zayat on Unsplash

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?

  1. 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.
  2. 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…

--

--

Satya Pavan Kantamani
Satya Pavan Kantamani

Written by Satya Pavan Kantamani

Android Dev, Interested in Traveling, App development. Based in Hyderabad, India. Catch me at https://about.me/satyapavankumar

No responses yet