Home » Android » overlay – Drawing over other applications in Android

overlay – Drawing over other applications in Android

Posted by: admin June 15, 2020 Leave a comment

Questions:

There is an interesting application called Twilight which appears to simply draw over all applications with a reddish filter to remove blue light during nighttime hours (presumably to help sleep).

I’m interested in doing something similar, but not necessarily for sleep purposes. I’d like to draw text or a watermark over everything on the phone. How can I do this (draw an Activity or something like it over everything) in Android?

How to&Answers:

You should look at Android System Overlay which pretty much draws a view on the root on Android Window Manager.

See: Creating a system overlay window (always on top)

You need “android.permission.SYSTEM_ALERT_WINDOW” permission in your manifest.

See: http://developer.android.com/reference/android/Manifest.permission.html#SYSTEM_ALERT_WINDOW

You might also like to look at Window manger