Skip to content

Multithreaded unblocking API to retrieve installed apps information using native built-ins

Notifications You must be signed in to change notification settings

pottercomuneo/react-native-android-installed-apps-unblocking

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-android-installed-apps-unblocking

Getting started

$ npm install react-native-android-installed-apps-unblocking

Mostly automatic installation

$ react-native link react-native-android-installed-apps-unblocking

Manual installation

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.androidinstalledapps.RNAndroidInstalledAppsPackage; to the imports at the top of the file
  • Add new RNAndroidInstalledAppsPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-android-installed-apps-unblocking'
    project(':react-native-android-installed-apps-unblocking').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-android-installed-apps/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-android-installed-apps-unblocking')
    

Methods

1 - getApps()

2 - getNonSystemApps()

3 - getSystemApps()

Return Result

  • packageName
  • versionName
  • versionCode
  • firstInstallTime
  • lastUpdateTime
  • appName
  • icon // Base64
  • apkDir
  • size // Bytes

Usage

import RNAndroidInstalledApps from 'react-native-android-installed-apps-unblocking';


RNAndroidInstalledApps.getApps()
      .then(apps => {
        this.setState({apps})
      })
      .catch(error => {
        alert(error);
      });

About

Multithreaded unblocking API to retrieve installed apps information using native built-ins

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 95.2%
  • JavaScript 4.8%