I'm trying to open a view with WindowManager, a view that will be above all the activities of my app, but not above other apps.
This is what i have so far:
WindowManager.LayoutParams layOutParams = new WindowManager.LayoutParams(
WindowManager.LayoutParams.TYPE_PHONE,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
PixelFormat.TRANSPARENT);
layOutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;
layOutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
LayoutInflater layOutInflater = (LayoutInflater) context.getSystemService(LAYOUT_INFLATER_SERVICE);
View viewAboveAllActivities = layOutInflater.inflate(R.layout.activity_flash_alert_layout, null);
wm = (WindowManager) context.getSystemService(WINDOW_SERVICE);
wm.addView(viewAboveAllActivities, layOutParams);
I have no idea what are the right layout params that will fit my needs, hope you guys can help.