java - Android: How to draw free on top of anything (any activity) -
how draw view on top of other activities regardless of showing , without using transparent activities or consuming touch events.
its display custom icon on screen on top of other apps reacts when touch can still touch other views on screen.
example: facebook chat heads displays dragable , clickable icon on screen regardless of doing whether on home screen or app menus or app. still can click chat head icon , background app elements seperately
how that?
take @ cool article, think that's want :
http://www.piwai.info/chatheads-basics
in short : want add permission manifest :
<uses-permission android:name="android.permission.system_alert_window" />
for api >= 23, you'll need request runtime permission settings.action_manage_overlay_permission
then in service, window manager
windowmanager = (windowmanager) getsystemservice(window_service);
and add views addview
method
Comments
Post a Comment