Skip to content

RomanSytnyk/blur-app-in-recents

Repository files navigation

Blur App In Recents

Platform - Android and iOS NPM Badge

A React Native module for Expo that prevents sensitive content from being visible in the app in Recents menu of iOS & Android.

This package can be useful for banking, finance, and other security-focused applications.

The key difference with Expo Screen Capture is that this package allows taking screenshots when the app is in the foreground, blurring content only in the background state.

Installation

You can install this package using npm or yarn:

npm install @roman.sytnyk/blur-app-in-recents

or

yarn add @roman.sytnyk/blur-app-in-recents

Also, don't forget make new prebuild to apply native code

npx expo prebuild

Usage

import BlurAppInRecents from '@roman.sytnyk/blur-app-in-recents';

React.useEffect(() => {
  BlurAppInRecents.enable();
}, []);

Screenshots

iOS Screenshot Android Screenshot

API

BlurAppInRecents

  • enable(): Activates the blur effect when the app goes to the Recents menu.
  • disable(): Deactivates the blur effect.
  • isBlurringEnabled(): Returns true if the blur effect is currently enabled.

Limitations

On Android devices below Android 13 with gesture navigation enabled, the overlay may briefly flash during the recents transition due to a known system bug.

Contributing

Please submit a pull request or open an issue to discuss what you would like to change. Maintainers are welcomed.

About

A React Native module for Expo that prevents sensitive content from being visible in the app in Recents menu of iOS & Android.

Topics

Resources

License

Stars

15 stars

Watchers

1 watching

Forks

Contributors