Answers for "React native bubble overlays over apps"

0

React native bubble overlays over apps

import { showFloatingBubble, hideFloatingBubble, requestPermission, initialize } from "react-native-floating-bubble"

// To display the bubble over other apps you need to get 'Draw Over Other Apps' permission from androind.
// If you initialize without having the permission App could crash
requestPermission()
	.then(() => console.log("Permission Granted"))
	.catch(() => console.log("Permission is not granted"))

// Initialize bubble manage
initialize()
	.then(() => console.log("Initialized the bubble mange"))

// Show Floating Bubble: x=10, y=10 position of the bubble
showFloatingBubble(10, 10)
	.then(() => console.log("Floating Bubble Added"));

// Hide Floatin Bubble
hideFloatingBubble()
	.then(() => console.log("Floating Bubble Removed"));
Posted by: Guest on August-31-2021

Code answers related to "React native bubble overlays over apps"

Browse Popular Code Answers by Language