List of utility methods to do System Property Get
String | getSystemProp(String key) get System Prop String line = ""; try { Process ifc = Runtime.getRuntime().exec("getprop " + key); BufferedReader bis = new BufferedReader(new InputStreamReader( ifc.getInputStream())); line = bis.readLine(); ifc.destroy(); } catch (java.io.IOException e) { ... |
String | getSystemProperty(String key, String def) get System Property try { final ClassLoader cl = ClassLoader.getSystemClassLoader(); final Class<?> SystemProperties = cl .loadClass("android.os.SystemProperties"); final Class<?>[] paramTypes = new Class[] { String.class, String.class }; final Method get = SystemProperties .getMethod("get", paramTypes); ... |