2009-09-08 7 views

Répondre

3

Il semble y avoir un exemple ici sur http://www.iphonedevsdk.com/forum/iphone-sdk-development/21456-detect-wheather-phone-silent-mode-ring-mode.html

ici Reproduit De Narender Mugdal:

CFStringRef route; 
UInt32 propertySize = sizeof(CFStringRef); 
AudioSessionInitialize(NULL, NULL, NULL, NULL); 
AudioSessionGetProperty(kAudioSessionProperty_Audi oRoute, &propertySize, &route); 
NSString *outputString = (NSString*)route; 
//NSLog(@"%@", outputString); 
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message: outputString delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil]; 
[alert show]; 
[alert release]; 
Questions connexes