Not a supported way AFAIK.

Currently you can use something like this (modified and taken from
http://groups.google.com/group/android-developers/browse_thread/thread/2572d2da0d75de08)

    private void getProperties()
    {
        try
        {
           ArrayList<String> processList = new ArrayList<String>();
            String line;
            java.lang.Process p = Runtime.getRuntime().exec("getprop");
            BufferedReader input =
                    new BufferedReader(new
InputStreamReader(p.getInputStream()));
            while ((line = input.readLine()) != null)
           {
                System.out.println("line); //<--
Parse data here.
                processList.add(line);
            }
            input.close();
        }
         catch (Exception err)
        {
            err.printStackTrace();
        }
}


But as hackbod said: "that is not something that is part of the SDK
and so you have no guarantees of it working on future releases or
other phones. "

Tauno


On Tue, Oct 28, 2008 at 2:07 PM, Ray Bellis <[EMAIL PROTECTED]> wrote:
>
> Is there any way to access the system properties (as listed by
> "getprop") from within Java on Android?
>
> thanks,
>
> Ray
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to