Back to project page androiddevice.info.
The source code is released under:
GNU General Public License
If you think the Android project androiddevice.info listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package info.androiddevice.deviceinventory.info; /* ww w. j a v a 2 s . co m*/ import android.annotation.TargetApi; import android.os.Build; import org.json.JSONException; import org.json.JSONObject; import java.util.Properties; public class JavaSystemProperty implements Property { @TargetApi(Build.VERSION_CODES.GINGERBREAD) @Override public Object getProperty() { if(Build.VERSION.SDK_INT < 9) { return JSONObject.NULL; } JSONObject jsonObject = new JSONObject(); Properties properties = System.getProperties(); for (String propertyName : properties.stringPropertyNames()) { try { jsonObject.put(propertyName, properties.getProperty(propertyName)); } catch (JSONException e) { } } return jsonObject; } @Override public String getName() { return "javasys"; } }