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 🙏

© 2025 – Pkg Stats / Ryan Hefner

rn-android-overlay-permission

v1.0.6

Published

Overlay Permission for Android apps

Readme

0x1bitcrack3r

rn-android-overlay-permission

React Native utility for managing Android overlay permissions optimized for accessibility-focused applications.

This lightweight module enables React Native apps to check and request overlay permissions (SYSTEM_ALERT_WINDOW) on Android devices. These permissions are crucial for apps that draw over other apps, especially those providing accessibility enhancements such as:

  • Assistive overlays (e.g., magnifiers, screen readers, text-to-speech aids)

  • Floating buttons or navigation aids for users with motor impairments

  • Real-time user guidance or help tools for cognitive accessibility

If you're developing tools to support digital inclusion, this module helps streamline the permission flow and ensure a smoother, more compliant user experience.

✨ Features

  • ✅ Check if overlay permission is currently granted

  • 🔓 Prompt users to open the system settings to enable overlay access

  • 🔄 Asynchronous API with Promise support for clean integration

  • ♿️ Built with accessibility use-cases in mind

Getting started

$ npm install rn-android-overlay-permission --save

Mostly automatic installation

$ react-native link rn-android-overlay-permission

Add these permissions in AndroidManifest.xml

<uses-permission android:name="android.permission.ACTION_MANAGE_OVERLAY_PERMISSION" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

Manual installation

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.overlaypermission.OverlayPermissionPackage; to the imports at the top of the file
  1. Append the following lines to android/settings.gradle:

        include ':rn-android-overlay-permission'
        project(':rn-android-overlay-permission').projectDir = new File(rootProject.projectDir, '../node_modules/rn-android-overlay-permission/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:

        compile project(':rn-android-overlay-permission')

Usage

//requestOverlayPermission Navigates to permission settings
OverlayPermissionModule.requestOverlayPermission();
import OverlayPermissionModule from "rn-android-overlay-permission";

if (Platform.OS === "android") {
  OverlayPermissionModule.isRequestOverlayPermissionGranted((status: any) => {
    if (status) {
      Alert.alert(
        "Permissions",
        "Overlay Permission",
        [
          {
            text: "Cancel",
            onPress: () => console.log("Cancel Pressed"),
            style: "cancel",
          },
          {
            text: "OK",
            onPress: () => OverlayPermissionModule.requestOverlayPermission(),
          },
        ],
        { cancelable: false }
      );
    }
  });
}

♿ Accessibility Use-Cases

This plugin is ideal for apps that:

  • Display accessibility layers (e.g., custom focus indicators, reading overlays)

  • Offer floating UI elements for users with physical disabilities

  • Implement always-on-top assistive controls or gesture aids

Overlay permissions are a critical enabler for inclusive design. With rn-android-overlay-permission, you can ensure users are guided appropriately through the permission flow without breaking your accessibility goals.

📋 Requirements

  • Android only (React Native)
  • Requires API level 23 (Android 6.0) or higher

📄 License

MIT