Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Device Owner - Get back status bar icons in lock task mode

Tags:

android

I have developed device owner application that have some kiosk admin app capabilities.

Among other stuff, I'm using locktask mode in order to disable back button, home button, recent apps button and status bar. And this is all nice. The problem is that icons (battery, wireless, ....) in status bar are not shown any more, this is not very nice for users .

This apps is intended to be used by company owned industrial devices, and it is very important for those icons to be shown all the time.

Is there any option that I can set in order to get those icons back?

like image 951
Novak Avatar asked Mar 30 '17 10:03

Novak


People also ask

What is lock task mode in Android?

You might use lock task mode if you're developing a kiosk application or a launcher to present a collection of apps. When the system runs in lock task mode, device users typically can't see notifications, access non-allowlisted apps, or return to the home screen (unless the home screen is allowlisted).

What is lock task?

Lock task mode settings allows the users to disable all the major system UI features such as home button, notifications, recent apps button, and global actions. Enabling lock task mode on the Android device transforms the device into an immersive kiosk, with only the whitelisted apps active on the device.

What is lock app mode?

Lock Android Tablet to One App. Introduced in Android 5.0, the Pin Windows feature in Android allows you to Lock your Android Phone or Tablet to a Single App. This allows you to hand over your Android Phone or Tablet to kids, without worrying about Apps being deleted or kids being exposed to in-appropriate content.

What is Android kiosk mode?

Android Kiosk Mode is a lock down mechanism that enables IT admins to run a single app or a pre-defined set of apps on Android smartphones and tablets, allowing these devices to function as kiosks.


1 Answers

According to the documentation,

In Android 9.0 or higher when lock task mode is enabled, your DPC can enable certain system UI features on the device.

Code below enables the status bar’s system info area that contains indicators such as connectivity, battery, and sound and vibrate options.

dpm.setLockTaskFeatures(adminName,
DevicePolicyManager.LOCK_TASK_FEATURE_SYSTEM_INFO |
      DevicePolicyManager.LOCK_TASK_FEATURE_OVERVIEW);
like image 128
Rohit Jagtap Avatar answered Oct 19 '22 23:10

Rohit Jagtap