ArticleDirectory
- Learn about audiomanager
- Introduction to audiomanager
Learn about audiomanager
The audiomanager class is located in the Android. Media package, which provides operations to control the volume and audible mode.
Introduction to audiomanager
There are too many methods for mail to audiomanager. Here are only a few common methods:
Method: adjustvolume (INT direction, int flags)
Explanation: This method is used to control the volume of the mobile phone when the first parameter is audiomanager. when adjust_lower is used, you can reduce the volume by one unit and transfer it to audiomanager. when adjust_raise is used, you can increase the volume by one unit.
Method: getmode ()
Explanation: The current audio mode is returned.
Method: getringermode ()
Explanation: The current ringtone mode is returned.
Method: getstreamvolume (INT streamtype)
Explanation: Obtain the current mobile phone volume. The maximum value is 7 and the minimum value is 0. When the value is 0, the mobile phone automatically adjusts the mode to "vibrate ".
Method: setringermode (INT ringermode)
Explanation: Change the ringtone mode.
Note: QQ technology exchange group: add one if you are interested in 108614806.