react-native-installed-application
v1.0.6
Published
API to retrieve installed apps information using native built-ins
Downloads
893
Maintainers
Readme
react-native-installed-application
React Native module which provides list of installed Android applications.
- Work for android
- Support typescript
Table of contents
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