Is it possible to create floating chat heads like facebook messenger by using react native?
No, Messenger didn't use React Native at the time it was rewritten. Again, this is a native app rewritten to a native app.
If bubbles aren't appearing on your Android, you'll need to turn them on. From Chats, tap your profile picture in the top left. Scroll down and tap Bubbles. Tap All conversations can bubble or Selected conversations can bubble.
In Android, Floating bubbles or ChatHeads allow quick access to core features without fully opening the app. For example, replying to messages through Floating bubbles. Floating bubbles are just views attached to WindowManager with custom flags.
Without native coding, you can just make them show inside of your app, here is fine example, it basically extends react-native-interactible example.
If you want them to stay when the app is closed, I am afraid that there is not some react native library at the moment (as far as I know) that can provide you that, just native code something like in this article.
We implemented a library for this. You need to install it and follow the instructions in the README.
Then:
import { showFloatingBubble, hideFloatingBubble, requestPermission } from "react-native-floating-bubble"
// Show Floating Bubble
showFloatingBubble().then(() => console.log("Floating Bubble Added"));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With