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

codeigniter - Fatal error: Call to undefined function lang() in CI Merchant using CardSave -

javascript - CasperJS/PhantomJS failing SSL handshakes on some sites even with --ssl-protocol=any -

python - Received unregistered task using Celery with Django -