android2018. 8. 30. 10:01
import java.lang.reflect.Method;

public class Test {

public static void readProperty(){
final String parmName = "paramName";
final String defaultParamName="foo";
try {

@SuppressWarnings("rawtypes")
Class SystemProperties = Class.forName("android.os.SystemProperties");
Method set1 = SystemProperties.getMethod("get", new Class[] {String.class, String.class});
String properties = (String) set1.invoke(SystemProperties, new Object[] {parmName, defaultParamName});

} catch( IllegalArgumentException iAE ){
throw iAE;
} catch( Exception e ){
e.printStackTrace();
}


}
}


Posted by easy16