/react-native-installed-apps

API to retrieve installed apps information using native built-ins

Primary LanguageJava

react-native-installed-application

Platform Version Download License

This package is support by daridasar.com

React Native module which provides list of installed Android applications.

  • Work for android
  • Support typescript

Table of contents

  1. Installation
  2. Usage
  3. result
  4. method

Installation

If using yarn:

yarn add react-native-installed-application

If using npm:

npm i react-native-installed-application

Usage

import React, { useState } from "react";
import { View, Text } from "react-native";
import RNInstalledApplication from 'react-native-installed-application';

const App = () => {
  const [data, setData] = useState([]);

  const getApplication = ()=>{
    RNInstalledApplication.getApps()
    .then(apps => {
      setData(apps)
    })
    .catch(error => {
      console.log(error);
    });
  }

  return (
    <View style={{ marginVertical: 80, marginHorizontal: 20 }}>
      <TouchableOpacity onPress={()=> getApplication()}>
        <Text>Hello World</Text>
      </TouchableOpacity>
    </View>
  );
};

export default App;

Getting started

$ npm install react-native-installed-application --save

Method

1 - getApps()

2 - getNonSystemApps()

3 - getSystemApps()

4 - isPackageInstalled(packageName)

Result

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