You are here
Home > Android > Observing Different Volume Streams and Keeping Fixed in Android

Observing Different Volume Streams and Keeping Fixed in Android

Hello Friends, Today I am going to share a way to observing different volume streams and keeping fixed in Android. There are different volume streams in Android i.e STREAM_MUSIC, STREAM_RING, STREAM_ALARM etc. We’ll use ContentObserver to detect change in volume. This code sample can be used where fixed volume needed i.e alarm app, phone finder app, theft warning app, etc. So Here is the code

MainActivity.java

activity_main.xml

Screenshots

AndroidStudio Project Download

 

Please don’t forget to share if you find it useful

Rajesh Kumar Sahanee
I am a passionate Java Developer and I like Computer Programming. I love to do some interesting experiments and listening music in my free time.
https://www.zatackcoder.com

Comments

zatackcoder
Top

  Â