Android Utililty Methods System Property Get

List of utility methods to do System Property Get

Description

The list of methods to do System Property Get are organized into topic(s).

Method

StringgetSystemProp(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) {
...
StringgetSystemProperty(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);
...