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

@enginnblt/react-native-privacy-protect

v0.1.3

Published

A cross-platform React Native library to protect sensitive app content when the app goes to the background or appears in the app switcher. Provides a blur (iOS) or secure overlay (Android) to hide UI content automatically.

Readme

react-native-privacy-protect

A cross-platform React Native library to protect sensitive app content when the app goes to the background or appears in the app switcher. Provides a blur (iOS) or secure overlay (Android) to hide UI content automatically.

Features

  • Automatic Background Detection: Automatically shows privacy protection when app goes to background
  • Cross-Platform: Works on both iOS and Android
  • Customizable Overlays: Support for custom images, blur effects, and overlay colors
  • Smooth Animations: Configurable fade in/out animations
  • Security Options: Android FLAG_SECURE support to block screenshots and app switcher
  • TypeScript Support: Full TypeScript definitions included

Installation

npm install @enginnblt/react-native-privacy-protect

React Native CLI Setup

iOS Setup

cd ios && pod install

Android Setup

No additional setup required for Android.

Examples

React Native CLI Example

See the example/ directory for a React Native CLI example.

Usage

Basic Usage with Auto-Enable

import PrivacyProtect from '@enginnblt/react-native-privacy-protect';

// Configure once in your App.tsx
useEffect(() => {
  PrivacyProtect.configurePrivacyProtect({
    autoEnable: true, // Automatically show privacy overlay when app goes to background
    blurRadius: 20, // Android 12+ blur effect
    blurStyle: 'dark', // iOS blur style
    overlayColor: '#00000066', // Semi-transparent overlay
    animated: true,
    animationDuration: 300,
  });
}, []);

Manual Control

import PrivacyProtect from '@enginnblt/react-native-privacy-protect';

// Configure without auto-enable
PrivacyProtect.configurePrivacyProtect({
  autoEnable: false,
  blurRadius: 15,
  overlayColor: '#00000080',
});

// Manually show/hide (if autoEnable is false)
// Note: These methods are available in the native module but not exposed in the JS API yet

Custom Background Image

PrivacyProtect.configurePrivacyProtect({
  backgroundImage: require('./assets/privacy-overlay.png'), // Local image
  overlayColor: '#00000040', // Light overlay on top of image
  animated: true,
});

Remote Image

PrivacyProtect.configurePrivacyProtect({
  backgroundImage: { uri: 'https://example.com/privacy-image.jpg' }, // Remote image
  overlayColor: '#00000060',
  animated: true,
});

Dynamic Image Switching

// Switch between different privacy modes
const switchToBlurMode = () => {
  PrivacyProtect.configurePrivacyProtect({
    blurStyle: 'dark',
    overlayColor: '#00000080',
    animated: true,
  });
};

const switchToImageMode = () => {
  PrivacyProtect.configurePrivacyProtect({
    backgroundImage: require('./assets/custom-bg.png'),
    overlayColor: '#00000040',
    animated: true,
  });
};

API Reference

configurePrivacyProtect(options)

Configure the privacy protection behavior.

Options

| Option | Type | Platform | Default | Description | |--------|------|----------|---------|-------------| | autoEnable | boolean | Android | false | Automatically show privacy overlay when app goes to background | | blurRadius | number | Android 12+ | 0 | Blur radius for the privacy overlay | | blurStyle | 'dark' \| 'light' \| 'extraLight' | iOS | - | iOS blur style | | overlayColor | string | Both | '#80000000' | Overlay color (hex format) | | animated | boolean | Both | true | Enable fade animations | | animationDuration | number | Both | 300 | Animation duration in milliseconds | | secureFlag | boolean | Android | false | Use FLAG_SECURE to block screenshots | | backgroundImage | ImageSourcePropType | Both | - | Custom image for privacy overlay (local or remote) |

Contributing

License

MIT


Made with create-react-native-library