Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native: Is it possible to create floating chat heads like facebook messenger?

Is it possible to create floating chat heads like facebook messenger by using react native?

like image 393
Ayyaz Zafar Avatar asked Aug 29 '17 19:08

Ayyaz Zafar


People also ask

Is Messenger made in 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.

How do I make chat heads appear?

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.

What is floating chat?

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.


2 Answers

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.

like image 179
zarcode Avatar answered Sep 20 '22 06:09

zarcode


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"));
like image 41
Janaka Chathuranga Avatar answered Sep 18 '22 06:09

Janaka Chathuranga