pnk-react-native-floating-bubble
v0.2.7
Published
A lightweight React Native floating bubble (Android) — original implementation by Raman (PNK).
Maintainers
Readme
pnk-react-native-floating-bubble
Original implementation — a minimal floating bubble/native overlay for Android (React Native).
Important: This implementation uses Android overlay APIs (APPLICATION_OVERLAY). Users must grant SYSTEM_ALERT_WINDOW / overlay permission on Android 6.0+.
Quick install (local)
From your React Native app root:
# if using local path
yarn add ../path/to/pnk-react-native-floating-bubble
# or npm install ../path/to/pnk-react-native-floating-bubbleAndroid setup
- This package includes an Android native module. Autolinking should work on RN >= 0.60.
- Add
android.permission.SYSTEM_ALERT_WINDOWhandling in runtime (the module will attempt to request it).
Usage
import FloatingBubble from 'pnk-react-native-floating-bubble';
FloatingBubble.show({ x: 100, y: 200 });
FloatingBubble.on('pressed', () => console.log('bubble pressed'));
FloatingBubble.hide();Notes
- This is an initial scaffold and example. You may need to adapt package names and Gradle configuration to match your project.
- Tested as scaffold only. Please test on device and grant overlay permission when prompted.
