PDA

View Full Version : Sleep timer shake reset



xbit
01-11-2010, 09:46 PM
I would love a feature added to the sleep timer in the pro edition to be able to reset the timer if I'm still awake when the timer is up. There is another audiobook player in the market which does this. About 10 seconds before the sleep timer is up it would play a tone to let the listener know it is about to sleep. If the user then shakes the phone, it will reset the timer. PLEASE? Love the program and this would make it even better!

Howard
01-12-2010, 08:55 AM
Thank you for your suggestion for making the Ambling BookPlayer work better. Another user also made this same suggestion in an email that they sent to me about 3 days ago, and we have now added this feature to the Pro edition.

The Ambling BookPlayer Pro edition v1.12 which was released this morning has this feature to allow you to restart the sleep timer by shaking the phone.

xbit
01-12-2010, 11:14 AM
Thank you for your suggestion for making the Ambling BookPlayer work better. Another user also made this same suggestion in an email that they sent to me about 3 days ago, and we have now added this feature to the Pro edition.

The Ambling BookPlayer Pro edition v1.12 which was released this morning has this feature to allow you to restart the sleep timer by shaking the phone.

Awesome, thanks! This is the best audiobook player available for Android and with service like this you will stay the best. I have no regrets about buying the pro edition. Keep up the great work!

xbit
01-13-2010, 09:30 AM
Awesome, thanks! This is the best audiobook player available for Android and with service like this you will stay the best. I have no regrets about buying the pro edition. Keep up the great work!

Hi,

So, I tried this out yesterday and ran into a problem. It seems to work ok as long as the phone's screen is on, but as soon as the screen turns off the shake no longer works. I wonder if the accelerometers are also shut down along with the screen. Anyway, since the screen is always off by the time the sleep timer triggers, this new shake awake feature doesn't work. Please check into it. I'm using a Nexus One if that info is useful

Also, I have a couple of suggestions for your consideration. It would be nice if it could play a soft tone ~5 or 10 seconds or so before the sleep time triggers so the sleep timer can be reset before the book stops playing. After the tone plays, slowly start to fade out the book. When the timer is reset by shaking the sound level is restored and that lets the user know when they can stop shaking. Also, if you add a tone, since it signals when it is time to shake you can just enable the accelerometers at that time instead of always on, which would probably save on battery life.

Howard
01-13-2010, 06:28 PM
You are correct that the accelerometer is shut down at the same time that the power management system shuts down the CPU. However the accelerometer is not shut down when the screen goes blank, and it is not shut down when the sleep timer pauses the playback.

The player is holding a wake lock to prevent the CPU from powering down while the audiobook is playing and during transitions between chapters/audio files when the media player is transitioning between files. If the sleep timer is active, the player will also continue to hold the wake lock and keep the accelerometer sensor active for 60 seconds after the sleep timer pauses the playback. You can see it count down the 60 seconds following the pause on the screen if the display is not blank. After that time the player does shuts down the accelerometer sensor and it releases the wake lock which lets the Android completely power down.

Could you confirm if you shook the phone within 60 seconds of the time that the sleep timer paused? It should have resumed playback during this interval. But the player will not respond to shaking, if it has been longer than 60 seconds since it paused.

I could change the code to hold the wake lock for even longer after the player pauses, but holding the wake lock and keeping the accelerometer sensor active do consume battery power, so I didn't want to hold them for too long.

Another user also made the suggestion of playing a warning tone shortly before the sleep timer pauses, and maybe that would help to make sure you do shake the phone again before the player has been paused for 60 seconds.

Thanks for providing feedback on how the sleep timer feature can be improved. Any further thoughts on how this could work better are appreciated.

xbit
01-14-2010, 10:56 AM
Yes, I can confirm I was shaking the phone within 60 seconds. With the screen on I am able to reset the timer at any time while it is counting down, or as you say, within 60 seconds after the book has stopped. If the screen is off, I cannot reset the timer at any point either before or after the timer has fired.

This is how I tested: In the android settings I set the screen timeout to be the lowest value (15 seconds). The in the ambling book player I started the sleep timer for 1 min. After the screen went dark and while the book was still playing I would shake the device. Then turn the screen on and see if the time had reset back to 1 min. It never did. Also, after 1 min was up and the book stopped I would shake the phone, it never started playing again. If I turned the screen on I could see the 60s countdown that happens after the book is stopped. At that point I can shake the phone and it would restart. (the screen has to be on).

I wonder if this is a change in the 2.1 sdk? As I mentioned before I am using a Nexus One. So, perhaps it is a change made to that sdk that affects the accelerometers availability in the stand by mode. It looks like Google has now release the 2.1 sdk, so hopefully you can use that to verify if that is the problem. Maybe it turns them off with the screen and the program has to turn them back on again? I have no idea, just throwing out guesses.

Thank you for your responsiveness and please let me know if I can provide any other information or assistance.

Howard
01-18-2010, 08:32 AM
We have fixed an issue in the way the accelerometer settings are read which should improve the detection when the phone is being shaken.

We have also changed the sleep timer to include audio feedback. The sleep timer will now chime at 15 seconds, 10 seconds, and 5 seconds before the player pauses. There is also audio feedback when you shake the phone and it resets the sleep time. In addition we have added audio feedback during the 60 seconds after the sleep timer pauses playback during which the phone is still awake and has the accelerometer active to detect if it has been shaken.

With the addition of the audio feedback the code has also been changed to not keep the accelerometer active during the entire sleep timer count down period. Instead the accelerometer is now activated just before the chimes start to indicate that playback is about to pause. This will help to extend the battery life on the phone.

Hopefully the new changes in the way the accelerometer force settings are read will resolve the problem you are seeing with the phone not detecting when it is shaken.

We expect to have these changes out in a new update within the next couple of days. If you would be interested in beta testing the changes before we have released them, to check if this resolves the issues you saw on your phone, please email me at support@amblingbooks.com

xbit
01-18-2010, 10:52 AM
We expect to have these changes out in a new update within the next couple of days. If you would be interested in beta testing the changes before we have released them, to check if this resolves the issues you saw on your phone, please email me at support@amblingbooks.com

I would be happy to beta test these features. I just sent you an email.

xbit
01-24-2010, 12:48 PM
I just wanted to post a followup publicly here for anyone else following this thread. Howard was very helpful and after a couple of beta versions found a work around to the problem. The sensors did not work when the screen was off, so when the sleep timer is up the screen turns on dim until it is reset or until 1 min past the timeout period. Today's release includes this fix along with others. Also, he was was kind enough to implement another request of mine to include an orientation sensor as well as shake. Thanks so much!