Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is Facebook Chat Heads implemented? [duplicate]

The Facebook Android Messenger application has a feature called Chat Heads. It lays a chat icon and window over the top of other applications. How is this achieved? Which Android APIs are used?

like image 661
Sam Avatar asked Apr 14 '13 02:04

Sam


People also ask

Can Messenger be duplicated?

Dual Messenger is available on all Galaxy phones running One UI. The feature essentially works by cloning a messaging app so that you can run a second instance of it on your phone. That way, you can use two Facebook or WhatsApp accounts on the same phone, making it that much more convenient.

Why do I have 2 chat heads on Messenger?

If you start an end-to-end encrypted chat with someone you already have a regular Messenger chat with, you'll see two different chats in your mobile app. End-to-end encrypted conversations have a padlock icon by the person's profile picture.

How do Facebook chat heads work?

A chat head (a circle with your friend's picture) will pop up when you get a new message on Facebook. You can view and reply to a message without leaving the screen you're on -- just tap the chat head.

Did bubbles replace chat heads?

Multiple users on /r/Android spotted that the Android 11 Bubbles have stopped working in recent versions of the app and have been replaced by Facebook Messenger's chat heads.


1 Answers

Search for permission android.permission.SYSTEM_ALERT_WINDOW and WindowManager.LayoutParams.TYPE_SYSTEM_ALERT.

See this blogpost by Daniel Jankowski and his WindowHead sample on GitHub.

In addition to the duplicate answer already listed, also see:

  • Having application running above other app
  • Disappearing facebook chat heads
like image 175
G. Lombard Avatar answered Oct 15 '22 03:10

G. Lombard