rn-installed-apps
v1.0.3
Published
This lib serves to get the list of apps installed on the android device
Downloads
3
Maintainers
Readme
rn-installed-apps
This library will return all applications with in Android device
Getting started
$ yarn add rn-installed-apps
Mostly automatic installation
Adding in AndroidManifest.xml
<queries>
<intent>
<action android:name="android.intent.action.MAIN" />
</intent>
</queries>
Manual installation
IOS Not Have Supported
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import br.com.ms.rn_installed_apps.RNInstalledAppsPackage;
to the imports at the top of the file - Add
new RNInstalledAppsPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':rn-installed-apps' project(':rn-installed-apps').projectDir = new File(rootProject.projectDir, '../node_modules/rn-installed-apps/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:implementation project(':rn-installed-apps')
Usage
import RNInstalledApps from "rn-installed-apps";
RNInstalledApps.getAllApps().then((data) => {
console.log(data);
});
Recommendation
- I advise using a thread lib react-native-bg-thread