Splash screen displays when resizing a window using WindowManager

I have (I hope) a little problem doing some development for Google TV

what I'm trying to do is that I want to show a small window in the lower right corner. It's good. The problem is that I'm not sure how to get rid of the screen saver in the background

This is the code that I have at the moment.

public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_eyece_box_window); final WindowManager.LayoutParams params = new WindowManager.LayoutParams( WindowManager.LayoutParams.TYPE_SYSTEM_ALERT, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE); params.gravity = Gravity.RIGHT | Gravity.BOTTOM; params.width = 300; params.height = 500; this.getWindow().setAttributes(params); } 

So, really, what I want is the application to be shown above the stack

Image of the issue

+4
source share
3 answers

I think my best solution for this is to basically drop it and create it in a special dialog

0
source

Add android.permission.WAKE_LOCK to the manifest and call PowerManager:

 PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); PowerManager.WakeLock wl = pm.newWakeLock( PowerManager.SCREEN_DIM_WAKE_LOCK | PowerManager.ON_AFTER_RELEASE, "tag"); wl.acquire(); wl.release(); 
+3
source

If you want to make an overlay on a live television signal, you can use this intention to show live television:

 final Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent.setData(Uri.parse("tv://passthrough")); context.startActivity(intent); 
0
source

All Articles