Thanks Mark.
Can you confirm if i am using WakeLock in the correct way please.
//My Service
public void onCreate() {
...
mPm = (PowerManager) getSystemService
(Context.POWER_SERVICE);
mWl = mPm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MGS");
mWl.acquire();
...
}
public void onDestroy() {
...
mWl.release();
...
}
The intention is to keep the CPU going so my service can log when a
location change happens, works as i want while the phone is fully
awake, though even with the above WakeLock it stops logging the
changes.
Do you have any suggestions? Thanks,
Liam
On 29 July, 11:56, Mark Murphy <[email protected]> wrote:
> Ne0 wrote:
> > I am having a similar issue, having my service monitor cell location
> > changes, but it stops logging them as soon as the power manager turns
> > everything off. I was just curious as to how the Phone app manages to
> > know that a call is coming through if the CPU is off? surely it must
> > have some way to "wake" it up? Does anyone know or have any idea's?
>
> AlarmManager and WakeLock are the means at the disposal of SDK
> applications. Use them judiciously, so you don't sap the user's battery
> life too much.
>
> --
> Mark Murphy (a Commons
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---