I want to get the iPOD/iPHONE "Ringer and Alert" device volume from setting->sounds section. i am able to get the device volume but not the ringer and alert volume.
Please can someone help me to solve this.
Thanks in advance.
I want to get the iPOD/iPHONE "Ringer and Alert" device volume from setting->sounds section. i am able to get the device volume but not the ringer and alert volume.
Please can someone help me to solve this.
Thanks in advance.
Try this
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(volumeChanged:)
name:@"AVSystemController_SystemVolumeDidChangeNotification"
object:nil];
- (void)volumeChanged:(NSNotification *)notification
{
NSDictionary*dict=notification.userInfo;
float newVolume =
[[dict objectForKey:@"AVSystemController_AudioVolumeNotificationParameter"]floatValue];
// newVolume is value that you need
}