I would like to improve my apps interaction with users.
Specifically in the area of "the BACK button".
At the moment, when necessary, I just prompt the user "Please tap BACK button" or similar.
And my assumption is they will be using either 2 or 3 button navigation and therefore will have a BACK button to tap.
But if they are using gesture navigation (on my Pixel3 [Settings] > [Accessibility] > [System controls] > [System navigation] > [Gesture navigation]) then this assumption is wrong and I should adjust my prompt to something like "Please swipe left or right from edge of screen to go back" or similar.
So I want to be able to establish what mode of system navigation is in use.
I have had no luck searching the forums and googling gave me:
https://stackoverflow.com/questions/74091225/get-status-of-system-navigation-bar-in-android
the last answer is:
which looks promising but googling "isGestureNavigationMode" gives nothing of value.
I am rapidly getting out of my pay grade, any help appreciated...
Specifically in the area of "the BACK button".
At the moment, when necessary, I just prompt the user "Please tap BACK button" or similar.
And my assumption is they will be using either 2 or 3 button navigation and therefore will have a BACK button to tap.
But if they are using gesture navigation (on my Pixel3 [Settings] > [Accessibility] > [System controls] > [System navigation] > [Gesture navigation]) then this assumption is wrong and I should adjust my prompt to something like "Please swipe left or right from edge of screen to go back" or similar.
So I want to be able to establish what mode of system navigation is in use.
I have had no luck searching the forums and googling gave me:
https://stackoverflow.com/questions/74091225/get-status-of-system-navigation-bar-in-android
the last answer is:
This method detects if the gesture navigation mode is enabled.
public static boolean isGestureNavigationMode(ContentResolver content) {
return Settings.Secure.getInt(content, "navigation_mode", 0) == 2;
}
You can know if the user is using the gesture navigation mode simply by calling the method on a Boolean object. Example:
boolean gestures = isGestureNavigationMode(this.getContentResolver());
If the Boolean gestures is true the user is using navigation mode otherwise no.
which looks promising but googling "isGestureNavigationMode" gives nothing of value.
I am rapidly getting out of my pay grade, any help appreciated...