开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜