Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawing over other applications in Android [closed]

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?

like image 312
Naftuli Kay Avatar asked Mar 07 '14 20:03

Naftuli Kay


1 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

like image 186
ranjk89 Avatar answered Oct 18 '22 01:10

ranjk89