• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Continue vibrating even when the screen times out

I have a small application that does the following. It counts down from 5 to 1 in vibrations. In other words, it vibrates 5 times and pauses then 4 times and pauses then 3 times etc. I am using a simple vibration pattern to do that which works nicely. Though, the thing is when the screen times out the vibration stops.

I know that, I can make the phone vibrate when the screen is off if i placed the vibration code in a service. Though, what I need is for the vibration to continue even when the screen times out. Meaning that my code starts vibrating the phone when the screen is lit and must continue vibrating when and after the screen times out until the pattern is over.

How can I accomplish this? Thank you for your time.

Edit: The phone vibrates and when the screen goes off, the vibration gets cut. I have tried using the vibration pattern within a service. It also gets cut off. If I use a timer to vibrate and time it so the vibrator runs after the screen goes off, it works without any problems. Though, when I open the screen and start the vibrate pattern within the service, it gets cuts off too as soon as the screen times out.
 
Back
Top Bottom