Android System Properties

While I was developing an Android app for a customer of mine, I asked to myself:- "which are the system properties available on Android Platform?".
I cannot find any exaustive page on internet speaking about that, so I wrote this post to share what I discover.
I wrote a simple app that prints in the log the system properties. This is what I found:

android.vm.dexfile:true
java.runtime.name:Android Runtime
java.runtime.version:0.9
java.vendor:The Android Project
java.vendor.url:http://www.android.com/
java.vm.version:1.0.1
java.vm.vendor:The Android Project
java.vm.name:Dalvik
java.vm.vendor.url:http://www.android.com/
java.vm.specification.name:Dalvik Virtual Machine Specification
java.vm.specification.vendor:The Android Project
java.vm.specification.version:0.9
java.io.tmpdir:/sdcard
java.library.path:/system/lib
javax.net.ssl.trustStore:/system/etc/security/cacerts.bks
java.specification.name:Dalvik Core Library
java.specification.version:0.9
java.specification.vendor:The Android Project
java.class.version:46.0
java.class.path:.
java.home:/system
java.version:0
java.ext.dirs:
java.boot.class.path:/system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
java.compiler:
os.version:2.6.29-00177-g24ee4d2
os.name:Linux
os.arch:OS_ARCH
user.language:en
user.region:US
user.name:
user.home:
user.dir:/
line.separator:
path.separator::
file.separator:/
file.encoding:UTF-8

You can get any of this property by calling System.getProperty(<property name>).
For example, if you want to know what is the user language you can call:

String language = System.getProperty("user.language");

 

Aggiungi Commento