Detect full screen in android from service -
i have service creates system overlay window (always on top) facebook messenger. need hide window when application in full screen mode. however, don't know how detect service.
this how add view in service:
windowmanager windowmanager = (windowmanager) getsystemservice(window_service); windowmanager.layoutparams params = new windowmanager.layoutparams( windowmanager.layoutparams.wrap_content, windowmanager.layoutparams.wrap_content, windowmanager.layoutparams.type_phone, windowmanager.layoutparams.flag_not_focusable, pixelformat.translucent); windowmanager.addview(myview, params);
i've had same problem while ago (see: receiving hidden status bar/entering full screen activity event on service). i've solved adding view window manager , control y position of view check if status bar visible or not.
Comments
Post a Comment