Navigation bar trigger and Modify Navigation Bar Buttons

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Navigation bar trigger and Modify Navigation Bar Buttons

Post by anuraag » 04 May 2019 02:20

Obviously this request come from new Tasker release
https://youtu.be/avtEQe0zjj4

Modify Navigation Bar Buttons will be used to set custom buttons. Mostly additional left/right button. It will help trigger some flow quickly while doing some stuffs and changing navigation bar as required.

Currently we may modify navigation bar using set secure setting but without a trigger its useless.

Thanks

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Navigation bar trigger and Modify Navigation Bar Buttons

Post by Desmanto » 04 May 2019 13:32

There is app to do that : https://forum.xda-developers.com/androi ... e-t3590967
but of course we prefer built in

I don't know if the customize icon can have long press or double tap action.

Currently I love RR ROM, because it has smartbar, where I can customize up to 7 navbar
Image
Each icon has been assigned to 3 action, for the single tap, double tap and long press. Can't imagine how I use my phone now without those button.
I planned to add another 2 if possible, but the smartbar is limited to 7 only.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Navigation bar trigger and Modify Navigation Bar Buttons

Post by Martin » 05 May 2019 15:06

I add it to the todo list.
Please check out this post https://www.xda-developers.com/how-to-c ... hout-root/. You can use it to send arbitrary keys but it does not show a way to launch an intent so I'm not sure how it could be used to trigger a specific flow. I could register Automagic to handle a few special key events like the browser key, contacts key, calendar key etc. I'll likely add distinct triggers for the keys so it's not tied to the nav bar customization.

BTW: The code that actually handles the sysui_nav_bar system setting can be found here (in case you are interested)

Regards,
Martin

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Navigation bar trigger and Modify Navigation Bar Buttons

Post by anuraag » 05 May 2019 17:07

Martin wrote:
05 May 2019 15:06
I could register Automagic to handle a few special key events like the browser key, contacts key, calendar key etc. I'll likely add distinct triggers for the keys so it's not tied to the nav bar customization.
That would be enough.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Navigation bar trigger and Modify Navigation Bar Buttons

Post by Martin » 15 May 2019 20:19

I''ve added some triggers to handle some special app launch events. See triggers Launch Browser/Calculator/Calendar/Contacts/Mail/Music App Intent Received.
You can use action Set System Setting with category secure, name sysui_nav_bar and e.g. value back;home;key(65:file:///storage/emulated/0/icon.png).

More details about the syntax can be extracted from the Java source: github - NavigationBarInflaterView.java

Following key codes can be used to launch the new triggers:
  • 64 --> Browser
  • 65 --> Mail
  • 207 --> Contacts
  • 208 --> Calendar
  • 209 --> Music
  • 210 --> Calculator
Regards,
Martin

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Navigation bar trigger and Modify Navigation Bar Buttons

Post by anuraag » 16 May 2019 13:35

Thanks for adding those.

I know key 64 and 65. But don't know where other keys belongs.
Tested with a flow. Working fine.

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Navigation bar trigger and Modify Navigation Bar Buttons

Post by anuraag » 19 May 2019 06:22

One can also use action Set System Setting with category secure, name sysui_nav_bar_left or sysui_nav_bar_right and e.g. value key(65:file:///storage/emulated/0/icon.png).

Pepy
Posts: 76
Joined: 31 Oct 2018 10:53
Location: Canada

Re: Navigation bar trigger and Modify Navigation Bar Buttons

Post by Pepy » 05 Jul 2019 21:24

Definitely looking forward to seeing this be implemented.
An great example of what this action can be used for is in this Tasker project someone posted on Reddit utilizing custom buttons depending on situation, such as what app is running, for quick shortcuts.
Hope my post was helpful :D
Device: OnePlus 5T running crDroid, rooted with Magisk 8-)

Locked