As you know a lot of application can show their views above all application.
You can see if in Facebook Messanger.

How to do it?

The Android API have SYSTEM_ALERT_WINDOW permission (“android.permission.SYSTEM_ALERT_WINDOW”).

The API said: “SYSTEM_ALERT_WINDOW Allows an app to create windows using the type TYPE_SYSTEM_ALERT, shown on top of all other apps.”

Lets see how it works.

Here is screenshot:


First you need create Android project.

2. Edit AndroidManifest.xml. Add android.permission.SYSTEM_ALERT_WINDOW permission.

3. Create OverlayButton class

4. Create Application class

5. Create Activity class. This one need for showing button in my case. You can use something another.

You can download full source code from github

Download it from github


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.