Hide navigation bar?

I am on android 6. Looking for a solution where I can hide and disable the navigation bar using soft keys (home, back, lately). On the google page (COSU IMPLEMENTATION) there is an image comparing the modes of fixing and blocking the task, and on the right side we see that the parameters look like "Home and last buttons are hidden" before the output mode. But I did not find any way to do this. I have already blocked activity, but still I can call up the navigation bar with a scroll up. Maybe someone here knows this.

+4
source share
3 answers

Ok For everyone who faces. Its impossible to hide the navigation bar at all. On the google web page, we see that only "HOME AND RECENT BUTTONS AID HIDDEN", ​​but not the BACK button. So now, using the startLockTask () method, we can hide all the BUT BACK buttons. Also, disabling the status bar, it will not be invisible. You can still call it with a napkin, but there's nothing on it.

+2
source

You no longer need to implement Device Policy Controller to manage your Android devices, Google recently released the Android Management API , which allows you to configure your COSU device with just a few Cloud API calls.

, , , ( ). , statusBarDisabled, , .

"applications": [
 {
   "packageName": "com.example.app",
   "installType": "FORCE_INSTALLED",
   "lockTaskAllowed": true,
   "defaultPermissionPolicy": "GRANT",
 },
"persistentPreferredActivities": [
  {
    "receiverActivity": "com.example.app/.com.example.app.MainActivity",
    "actions": [
      "android.intent.action.MAIN"
    ],
    "categories": [
      "android.intent.category.HOME",
      "android.intent.category.DEFAULT"
    ]
  }
],
"statusBarDisabled": true
+1

You can see the official documentation that will show you how to hide the navigation bar: Android official documentation

-1
source

Source: https://habr.com/ru/post/1688347/


All Articles