0

It means, how the app get the navigation bar mode in which of the following 3 modes

  • gesture navigation

  • 3-button navigation

  • 2-button navigation

Jater.Zhu
  • 13
  • 2

1 Answers1

0

You can use the below code , may not work on all android devices

public static int isEdgeToEdgeEnabled(Context context) {
        Resources resources = context.getResources();
        int resourceId = resources.getIdentifier("config_navBarInteractionMode", "integer", "android");
        if (resourceId > 0) {
            return resources.getInteger(resourceId);
        }
        return 0;
    }

The value that returned by isEdgeToEdgeEnabled function will follow below:

  • Navigation is displaying with 3 buttons

  • Navigation is displaying with 2 button(Android P navigation mode)

  • Full screen gesture(Gesture on android Q)

gtxtreme
  • 1,219
  • 1
  • 7
  • 20
  • References from answers [here](https://stackoverflow.com/questions/57624920/how-to-detect-full-screen-gesture-mode-in-mi-devices-programmatically) and [here](https://stackoverflow.com/questions/56689210/how-to-detect-full-screen-gesture-mode-in-android-10) – gtxtreme Aug 17 '21 at 08:28