Java tutorial
//package com.java2s; import android.os.Build; import java.lang.reflect.Method; public class Main { public static boolean hasSmartBar() { try { Method method = Class.forName("android.os.Build").getMethod("hasSmartBar"); return ((Boolean) method.invoke(null)).booleanValue(); } catch (Exception e) { } if (Build.DEVICE.equals("mx2") || Build.DEVICE.equals("mx3")) { return true; } else if (Build.DEVICE.equals("mx") || Build.DEVICE.equals("m9")) { return false; } return false; } }