I want to know what is flag(or what are the possible values for flag) in
audiomanager.setStreamVolume (int streamType, int index, int flags);
I know we can get the maximum stream using
audiomanger.getMaxStream(audioManager.getStreamMax(AudioManager.STREAM_MUSIC));
But in some device it gives 13,15, it depends on Android version or device hardware and what is it range(minimum possible value, maximum possible value)
Sets the volume index for a particular stream.
This method has no effect if the device implements a fixed volume policy as indicated by isVolumeFixed().// what does it mean.
Parameters
streamType The stream whose volume index should be set.
index The volume index to set. See getStreamMaxVolume(int) for the largest valid value.
flags One or more flags. // what are these flags
About the flag parameter: There are some flags defined in AudioManager.java. You can use any one of them to get the desired affect. example :
or simply
here is the code segment from AudioManager.java showing how they are defined.