B
B
Bogdan2019-02-08 00:10:56
Android
Bogdan, 2019-02-08 00:10:56

Hide status bar when asking for permission?

Hello. Tell me please. In the main Activity, I hid the Status Bar (top and bottom)

MainActivity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
            | View.SYSTEM_UI_FLAG_FULLSCREEN
            | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
            | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
            | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);

Everything works fine, but when the request comes, not getting access to the USB device
PendingIntent mPendingIntent = PendingIntent.getBroadcast(currentContext, 0 , new Intent(ACTION_USB_PERMISSION), 0);
        usbManager.requestPermission(currentDevice, mPendingIntent);

status bars appear that run into Activity objects.
5c5c9eb099a16824770398.png
Is it possible to remove the status bar or when a window appears asking for access or when it closes?
Or maybe you can make it so that the window does not appear?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2019-02-08
@zagayevskiy

No. Permishin request is a separate system activity, it manages all this by itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question