TransWikia.com

Enable/disable navbar NO REBOOT

Android Enthusiasts Asked on November 11, 2021

I am using Linage 16 and there I have got enable navbar setting. I want to enable navbar using Tasker program. I have read some info here: Enable On-screen navigation in CM12 (Lollipop) using shell? . But I still don’t understand how to make it.

One Answer

This is interesting haven't tested this thoroughly but you can try this;

Tasker now has WRITE_SECURE_SETTINGS permission to the Manifest. Hence it is now easier to control device Secure/Global settings without needing an additional plug-in such as AutoTools or SecureTask.

You can enable this new permission by issuing the following command via ADB (important):

adb shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGS

Now the business end you, since you want to use the Java function proceed as follows:

We need to call,

cr = CONTEXT.getContentResolver();
Settings.Secure.putInt(context.getContentResolver(), 
Settings.Secure.DEV_FORCE_SHOW_NAVBAR, 1);)

As usual create a task to this this, name it accordingly.

The following actions are found under Code → Java function

A1: Java Function [ Return:cr Class Or Object:CONTEXT Function:getContentResolver {ContentResolver} ()

A2: Java Function [ Class Or Object:Secure Function:putInt{boolean} (ContentResolver, String, int) Param(ContentResolver): cr Param(string):dev_force_show_navbar Param:(int):1

Save and execute task to test


However I would have preferred a simpler route with run shell (Tasker) or adb:

A1: Code Run shell [Command: settings put secure dev_force_show_navbar 1 Tick Use root]

or

adb shell settings put secure dev_force_show_navbar 1

Answered by xavier_fakerat on November 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP