18

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

Marco
  • 517
  • 6
  • 19
Ayyaz Zafar
  • 2,015
  • 5
  • 26
  • 40
  • This is how you create "floating chat heads" in normal java (inside AND outside of your app) on Android [here](https://stackoverflow.com/questions/47244548/changing-layoutparams-of-always-visible-chat-heads-to-not-always-visible/47623784#47623784). Because react-native uses JavaScript (inside it's own sandbox), I don't think you can produce "chat-heads" outside of your app. – Jon Goodwin Dec 30 '17 at 17:26

2 Answers2

15

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.

zarcode
  • 2,465
  • 17
  • 31
3

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"));
double-beep
  • 5,031
  • 17
  • 33
  • 41
Janaka Chathuranga
  • 1,742
  • 16
  • 19