android - Which one drains more battery: listen to volume change or accelerometer? -


my app need play music whenever user want in screen off mode. know 2 ways it: - use fake mediaplayer volume = 0 listening volume button. - use accelerometer dectect shake.

so, 1 drains more battery? 1 should choose? there other way? ur helps

the accelerometer more battery intensive. if nothing else using it, need turned on costs power. if using it, you'll receiving regular updates take more cpu power process single message when button pushed.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -