This will work except for logging processes running when the screen is
off, of course (e.g., all those that read notifications), it depends
how you define rarely used.

kris

On Fri, Feb 8, 2013 at 8:18 AM, Dan <dan.schm...@gmail.com> wrote:
>
>
> On Thursday, February 7, 2013 12:12:34 PM UTC-5, Kristopher Micinski wrote:
>>
>> Of course, the caveat here is that you're also going to waste a good
>> amount of battery.
>>
>> kris
>>
>> On Thu, Feb 7, 2013 at 10:30 AM, Nobu Games <dev.nob...@gmail.com> wrote:
>> > This is pretty similar to the "battery optimization app" problem. Dan
>> > suggests the proper API methods for querying what's running right now.
>> > In
>> > order to track what's least used on the phone you need to keep track of
>> > what
>> > is used most.
>> >
>> > And keeping track means that you need to poll that data in regular
>> > intervals
>> > (once an hour or something like that). You should use AlarmManager for
>> > that
>> > so your app can go to sleep in between these checks.
>>
>
>
>
> I'd actually suggest listeners for Intent.ACTION_SCREEN_OFF and
> Intent.ACTION_SCREEN_ON so you don't wake the device from deep
> sleep and only register the alarm when the screen is on.
>
> The biggest battery cost is going from the radio processor only on mode
> to application processor + screen running (that's why you have a so/so
> number for talk time and a big number for "standby") and if you can avoid
> pulling the device from standby (and letting other things grab cycles as
> well)
> that's a much bigger optimization than grabbing fewer cycles when
> the device is already awake and will have a similar use pattern to reading
> the
> logcat (which would have happened only while the application processor
> was awake) vs. an every hour alarm that might wake the device 6 to 10
> times a night to record that the user isn't doing anything.
>
> --
> --
> 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
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to