Android examples for Android OS:System Model
Return true if device has the Dalvik runtime, otherwise false.
import android.os.SystemPropertiesReflect; public class Main{ private static final String SELECT_RUNTIME_PROPERTY = "persist.sys.dalvik.vm.lib"; private static final String LIB_DALVIK = "libdvm.so"; /** Return true if device has the Dalvik runtime, otherwise false. */ public static boolean isRuntimeDalvik() { return getCurrentRuntime().equalsIgnoreCase(LIB_DALVIK); }//from w w w . java2 s .com /** Return the current runtime, otherwise null. * @return current runtime */ public static String getCurrentRuntime() { return SystemPropertiesReflect.get(SELECT_RUNTIME_PROPERTY); } }