Hey all, since I'm on this forum I'm having a great help of you guys.
Now I got an question about 'listening' to hardware buttons.
In this example down here I am listening to the Volume up and Down buttons at the side of your phone, which will also listen to the Volume buttons on your iPhone headset.
Now I'm wondering how to get an notification about the middle button on my headset. I tried to find different 'AVSystemController_' notifications but without any luck.
When I'm logging the notification userInfo, it wont be triggered by the middle button, only the volume buttons which is kinda logical since I'm checking for ' _SystemVolumeDidChangeNotification'.
Does anyone has any experience with this, or can point me to some sdk which I cant find now ?
Any help would be great!
Now I got an question about 'listening' to hardware buttons.
In this example down here I am listening to the Volume up and Down buttons at the side of your phone, which will also listen to the Volume buttons on your iPhone headset.
Code:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(volumeChanged:)
name:@"AVSystemController_SystemVolumeDidChangeNotification"
object:nil];
-(IBAction)volumeChanged:(NSNotification *)notification {
float volume = [[[notification userInfo]
objectForKey:@"AVSystemController_AudioVolumeNotificationParameter"]
floatValue];
NSLog(@"%.2f", volume);
}
Now I'm wondering how to get an notification about the middle button on my headset. I tried to find different 'AVSystemController_' notifications but without any luck.
When I'm logging the notification userInfo, it wont be triggered by the middle button, only the volume buttons which is kinda logical since I'm checking for ' _SystemVolumeDidChangeNotification'.
Does anyone has any experience with this, or can point me to some sdk which I cant find now ?
Any help would be great!
Last edited by a moderator: