Notification notification); those parameters allow to stay service alive and no matter what will persist over the top of apps // this will cause to show notification in status bar as long as the service retains. you can set pendingIntent to bind some actions on it
actual view to the window manager service. WindowManager.LayoutParams windowLayoutParams = new WindowManager.LayoutParams( CANVAS_WIDTH, CANVAS_HEIGHT, WindowManager.LayoutParams.TYPE_PHONE, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, PixelFormat.TRANSLUCENT); windowLayoutParams.gravity = Gravity.BOTTOM | Gravity.END; with incorrect parameters, service may block touch events for lower app in view hierarchy (because our service is on top), even keyboard will not work. https://developer.android.com/reference/android/view/ WindowManager.LayoutParams.html