Search code examples
androidsystem-properties

Can you observe system property changes in Android?


Is there a mechanism for observing changes in system properties from your own app in Android SDK?

For example, I want to be able to detect changes in the system.adb.tcp.port property.


Solution

  • I don't think exist a mechanism to do this., but you may be able to retrieve system properties by executing getprop in a Process and retrieve its output.

    or try this link : [for System.getProperty()] http://developer.android.com/reference/java/lang/System.html#getProperty%28java.lang.String,%20java.lang.String%29