npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-package-checker

v1.0.0

Published

React Native native module to detect installed Android packages with Expo plugin support

Readme

react-native-package-checker

A React Native native module for detecting installed Android packages with full Expo support via config plugin.

Features

  • ✅ Check if a specific Android package is installed
  • ✅ Find packages matching a regex pattern
  • ✅ Full TypeScript support
  • ✅ Expo SDK 52 compatible
  • ✅ Works with Expo prebuild and EAS Build
  • ✅ React Native 0.73+ compatible

Installation

npm install react-native-package-checker
# or
yarn add react-native-package-checker

Expo Projects

Add the plugin to your app.json or app.config.js:

{
	"expo": {
		"plugins": ["react-native-package-checker"]
	}
}

Then run prebuild:

npx expo prebuild

Bare React Native Projects

For bare React Native projects, you'll need to manually link the native module:

Android

  1. Add the package to your android/settings.gradle:
include ':react-native-package-checker'
project(':react-native-package-checker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-package-checker/android')
  1. Add the dependency in android/app/build.gradle:
dependencies {
    implementation project(':react-native-package-checker')
}
  1. Register the module in MainApplication.java:
import com.packagechecker.PackageCheckerPackage;

@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
      new PackageCheckerPackage() // Add this line
  );
}
  1. Add the permission to your AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />

    <queries>
        <intent>
            <action android:name="android.intent.action.MAIN" />
        </intent>
    </queries>
</manifest>

Usage

import PackageChecker from "react-native-package-checker";

// Check if a specific package is installed
async function checkChrome() {
	const isInstalled = await PackageChecker.isPackageAvailable("com.android.chrome");
	console.log("Chrome installed:", isInstalled);
}

// Find all Google packages
async function findGooglePackages() {
	const packages = await PackageChecker.checkPackagesByPattern("com\\.google\\..*");
	console.log("Google packages:", packages);
}

// Find all packages containing "facebook"
async function findFacebookPackages() {
	const packages = await PackageChecker.checkPackagesByPattern(".*facebook.*");
	console.log("Facebook packages:", packages);
}

API

isPackageAvailable(packageName: string): Promise<boolean>

Check if a specific Android package is installed on the device.

Parameters:

  • packageName (string): The Android package name (e.g., "com.android.chrome")

Returns: Promise that resolves to true if package is installed, false otherwise

Example:

const isInstalled = await PackageChecker.isPackageAvailable("com.whatsapp");

checkPackagesByPattern(pattern: string): Promise<string[]>

Find all installed packages matching a regex pattern.

Parameters:

  • pattern (string): A regex pattern to match package names (e.g., "com.google.*")

Returns: Promise that resolves to an array of matching package names

Example:

// Find all packages starting with "com.google"
const googleApps = await PackageChecker.checkPackagesByPattern("^com\\.google\\..*");

// Find all packages containing "camera"
const cameraApps = await PackageChecker.checkPackagesByPattern(".*camera.*");

Platform Support

  • ✅ Android
  • ❌ iOS (not applicable - iOS doesn't allow package detection for privacy reasons)

Permissions

This package requires the QUERY_ALL_PACKAGES permission on Android 11+ (API level 30+). The Expo config plugin automatically adds this permission to your AndroidManifest.xml.

Requirements

  • Expo SDK 52.0.0 or higher (for Expo projects)
  • React Native 0.73.0 or higher
  • Android minSdkVersion 21 or higher

License

MIT

Contributing

Contributions are welcome! Please open an issue or submit a pull request.