Ability to monitor sound volume when headphones are used? I am curious if there is a way to log sound volume when headphones are used to play music.

I am doing a research project to quantify hearing loss resulting from listening to music on phones and need a way for people to provide stats about how loud and how long people are listening to music with their headphones on an android phone.

Is this something I would need to root the phone to do?
No, you do not need root to monitor the volume.

If you're looking to develop an app for this project, you're in the lucky place because you do not need to know Android programming to deploy this.

There's an app called Tasker, which allows you to automate your device, but also allows you to export apk's (Android applications)!

Screenshot:



With Tasker, you can set up a profile to detect "volume changed" and send it to your webserver (or store it locally).

The navigation is Profiles Tab &gt; "+" on bottom right &gt; Event &gt; Variable Set &gt; Media Volume: %VOLM and create a new task to send it to your webserver via Action &gt; Net &gt; HTTP Post.

After that, download Tasker App Factory (separate app), and move your profile into a new project by long-pressing on the home icon, clicking "New Project", and naming it. You'll have to drag your profile and task to the new project, and set an icon for your project. Finally, you'll be able to long-press on your project, hit Export, and hit "As App".

Good luck with your project!