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
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)
import android.content.Context
import android.provider.Settings
enum class SystemNavigation {
THREE_BUTTON,
TWO_BUTTON,
GESTURE;
companion object {
fun create(context: Context) = values().getOrNull(
Settings.Secure.getInt(context.contentResolver, "navigation_mode", -1)
)
}
}
val systemNavigation = SystemNavigation.create(context)