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?
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.
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.
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.
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.
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:
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