Ashad
Ashad

Reputation: 2513

React Native : How to get the list of apps installed in mobile phone in react native

Is there a way to get the list of all apps installed in the device with its detail in react native.

I had tried this npm package but it does not work at all.

https://github.com/progaymanalaiwah/react-native-android-installed-apps

Upvotes: 3

Views: 10481

Answers (3)

Louay Sleman
Louay Sleman

Reputation: 2106

To get a list of all installed apps on a mobile phone using React Native, you can use the react-native-launcher-kit bundle. This bundle provides a simple API to access various features related to app launchers on Android devices, including the ability to get a list of all installed apps.

To get started, install the react-native-launcher-kit package by running the following command in your project directory:

npm install react-native-launcher-kit

Once you have installed the package, you can use the getApps() method to get a list of all installed apps on the device. The method returns an array of objects, where each object represents an installed app and contains information such as the app name, icon, and package ID.

Here is an example of how to use the getApps() method:

import { InstalledApps } from 'react-native-launcher-kit';

const apps = InstalledApps.getApps();
console.log(apps);

In addition to getting a list of installed apps, the react-native-launcher-kit bundle provides other features related to app launchers, such as checking the current default launcher, monitoring battery percentage and charging status, checking if a package (bundle ID) is installed, and opening system settings. You can also open an app using its bundle ID, directly access the "Set as default launcher" screen, and open the alarm app directly.

The react-native-launcher-kit bundle is an efficient solution for developers who want to create Android launchers using React Native. With its seamless user experience and simplified development process, this bundle is an essential tool for anyone working on mobile app development.

I hope this helps!

Upvotes: 4

Manuel Tumiati
Manuel Tumiati

Reputation: 96

I didn't find anything that works for both Android and iOS at the same time. My suggestion is to have a look at this libraries and to create your own version that can handle both:

Android: https://github.com/redpandatronicsuk/react-native-check-app-install

iOS: https://github.com/dimapaloskin/react-native-installed-apps

Upvotes: 1

Ayush Garg
Ayush Garg

Reputation: 546

I've recently published an npm module for this specific purpose.

The package name is react-native-android-installed-apps-unblocking. It is multi-threaded, which does not block the UI while loading the apps.

For more details check out my GitHub repo.

Upvotes: 1

Related Questions