Thanks Mark, great trick.

Here's the code that worked:

            Intent bat = loader.registerReceiver(null, new
IntentFilter(Intent.ACTION_BATTERY_CHANGED));
            int level = bat.getIntExtra("level", 0);
            int scale = bat.getIntExtra("scale", 100);
            return level * 100 / scale;

cheers

    guich

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
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