I just wanted to add something now.

After reading through the mailing list I have tried to get the whole
thing working with the PendingIntent sending a broadcast every 30
seconds which gets caught by a broadcast receiver. This broadcast
receiver starts the notifications (vibrate and sound) in its onReceive
method. (without starting an extra service) BUT I got the whole
problems again. As a maximum I am getting the vibrate notification.
Even when I acquire a partial wake lock at the beginning of
"onReceive" and release it at the end I am getting these errors. As
soon as I plug in the USB cable or light up the screen everything is
going back to normal.

To be honest I don't really know how to handle this correctly. What am
I doing wrong? I'm getting crazy about these wake lock errors. :(

On 25 Apr., 11:46, code_android_festival_way
<[email protected]> wrote:
> Hello.
>
> I got a problem with my sound notifications not being sent while the
> screen is off and the device is unplugged from the charger.
>
> Here is the workflow:
>
> - Alarm Service gets fired every 30 seconds (well the timer can be
> adjusted)
> - The alarm starts a service which fires a sound and vibrate
> notification
> - The service holds a PARTIAL_WAKE_LOCK acquired in onCreate and
> released in onDestroy
>
> Here is the result of the whole thing:
>
> - Both notifications get fired as long as the screen is on
> - Both notifications get fired as long as the device is plugged into
> the charger (via USB) even when the screen is off (done by pressing
> the power button)
> - BUT only the vibrate notification gets fired when the screen is off
> (user pressed the power button once)
> - When pressing the power button once again and the screen is on again
> the notifications are back to normal behaviour and both get fired
>
> Could someone tell me why the sound notification ignores the wake lock
> and sits down in silence? From the logs I can say that the service
> runs normally and gets from onCreate to onDestroy pretty fine.
>
> I have tested this behaviour on a default Nexus One.
>
> Could someone help me or got a solution for this problem?
>
> Thank you very much.
>
> --
> 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 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
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