How to check Programmatically the volume of phone in android?
I am developing an application in which i will play music..Now i want to check whether the user has reduced the volume 开发者_如何学编程of the phone or not... I want the music to play at a particular volume...How to do it?
You can use AudioManager.getStreamVolume to fetch the current volume for the media player stream (See STREAM_MUSIC), and AudioManager.setStreamVolume to set it.
精彩评论