Page 1 of 1

Navigation bar trigger and Modify Navigation Bar Buttons

Posted: 04 May 2019 02:20
by anuraag
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

Re: Navigation bar trigger and Modify Navigation Bar Buttons

Posted: 04 May 2019 13:32
by Desmanto
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.

Re: Navigation bar trigger and Modify Navigation Bar Buttons

Posted: 05 May 2019 15:06
by Martin
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

Re: Navigation bar trigger and Modify Navigation Bar Buttons

Posted: 05 May 2019 17:07
by anuraag
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.

Re: Navigation bar trigger and Modify Navigation Bar Buttons

Posted: 15 May 2019 20:19
by Martin
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

Re: Navigation bar trigger and Modify Navigation Bar Buttons

Posted: 16 May 2019 13:35
by anuraag
Thanks for adding those.

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

Re: Navigation bar trigger and Modify Navigation Bar Buttons

Posted: 19 May 2019 06:22
by anuraag
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).

Re: Navigation bar trigger and Modify Navigation Bar Buttons

Posted: 05 Jul 2019 21:24
by Pepy
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.