react-native-installed-apps-android
v3.0.0
Published
Get user-facing installed Android apps list (apps with launcher activities) with app version
Maintainers
Readme
react-native-installed-apps-android
Get installed Android apps list via React Native Turbo Module
Installation
npm install react-native-installed-apps-androidAndroid Permissions
Add the following to your Android app's android/app/src/main/AndroidManifest.xml:
<queries>
<intent>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent>
</queries>Note: This library uses Intent queries to get only user-facing apps (apps with launcher activities), which means:
- ✅ No
QUERY_ALL_PACKAGESpermission required - ✅ No Google Play Console approval needed
- ✅ Works on all Android versions
- ✅ Returns all apps that users can launch (including system apps like YouTube, Chrome, etc.)
- ✅ Excludes background services and non-launchable system components
Usage
import { getInstalledApps } from 'react-native-installed-apps-android';
// Get list of user-facing installed apps (apps with launcher activities)
getInstalledApps()
.then(apps => {
console.log('User-facing installed apps:', apps);
// Each app object contains:
// {
// packageName: string,
// appName: string,
// appVersion?: string
// }
})
.catch(error => {
console.error('Error getting installed apps:', error);
});TypeScript Support
The library includes full TypeScript support:
import { getInstalledApps, type InstalledApp } from 'react-native-installed-apps-android';
const apps: InstalledApp[] = await getInstalledApps();API
getInstalledApps(): Promise<InstalledApp[]>
Returns a promise that resolves to an array of user-facing installed apps (apps that have launcher activities and can be opened by users). This includes user-installed apps as well as system apps that have launcher icons (like YouTube, Chrome, Gmail, etc.), but excludes background services and non-launchable system components.
InstalledApp Interface
interface InstalledApp {
packageName: string; // e.g., "com.android.chrome"
appName: string; // e.g., "Chrome"
appVersion?: string; // e.g., "108.0.5359.79" (Android only)
}Note:
appVersionis only available on Android. iOS will return "Unknown" due to sandboxing restrictions.- On iOS, only the current app's information is returned due to platform restrictions.
Example
import React, { useEffect, useState } from 'react';
import { View, Text, FlatList } from 'react-native';
import { getInstalledApps, type InstalledApp } from 'react-native-installed-apps-android';
export default function App() {
const [apps, setApps] = useState<InstalledApp[]>([]);
useEffect(() => {
getInstalledApps()
.then(setApps)
.catch(console.error);
}, []);
return (
<View>
<Text>Installed Apps ({apps.length})</Text>
<FlatList
data={apps}
keyExtractor={item => item.packageName}
renderItem={({ item }) => (
<View>
<Text>{item.appName}</Text>
<Text>{item.packageName}</Text>
{item.appVersion && <Text>Version: {item.appVersion}</Text>}
</View>
)}
/>
</View>
);
}Platform Support
- ✅ Android: Full support - returns all user-facing installed apps with complete information including app version
- ⚠️ iOS: Limited support - due to iOS sandboxing restrictions, only returns information about the current app. App version is still provided based on the current app.
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library
