This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FullscreenOverlayService extends Service { | |
private View overlay; | |
private WindowManager windowManager; | |
@Nullable | |
@Override | |
public IBinder onBind(Intent intent) { | |
return null; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final WindowManager.LayoutParams params = new WindowManager.LayoutParams( | |
WindowManager.LayoutParams.FLAG_FULLSCREEN, | |
WindowManager.LayoutParams.FLAG_FULLSCREEN, | |
WindowManager.LayoutParams.TYPE_SYSTEM_ALERT, | |
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN, | |
PixelFormat.TRANSLUCENT); | |
WindowManager wm = (WindowManager) getApplicationContext() | |
.getSystemService(Context.WINDOW_SERVICE); |