Java tutorial
//package com.java2s; import android.content.Context; import android.view.ViewConfiguration; public class Main { public static boolean hasHardwareMenu(Context context, int currentVersion) { if (currentVersion < 11) { return true; } else if (currentVersion >= 11 && currentVersion <= 13) { return false; } return ViewConfiguration.get(context).hasPermanentMenuKey(); } }