Liam W
Liam W

Reputation: 1163

Draw over another app?

I am wanting to be able to start an activity of my app from anywhere in Android. I am wanting to do this by overlaying a button over any apps that are open.

How would I go about doing this, if it is possible.

Upvotes: 0

Views: 830

Answers (2)

Vishnu Haridas
Vishnu Haridas

Reputation: 7527

Surely you can do this. There's "Stand-Out" library available in GitHub. You can check it here - https://github.com/pingpongboss/StandOut

And this works super fine without root permission.

Upvotes: 0

Delyan
Delyan

Reputation: 8911

You can do it, without root or any modifications to the system, as Facebook clearly show with Chat Heads.

All you need is a special permission android.permission.SYSTEM_ALERT_WINDOW that lets you add windows with type TYPE_SYSTEM_ALERT that are displayed above other apps. Then, with some intimate knowledge of WindowManager, you can do practically anything you want.

It would be pretty difficult to do this for a specific app but probably not impossible.

Upvotes: 1

Related Questions