views:

46

answers:

1

I'm trying to make my monotouch app continue playing when the device is locked, I found this snippet in ObjC, was wondering if mt already has bindings for it or not.

AudioSessionInitialize (NULL,NULL,interruptionListenerCallback,self);
UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback;
AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory), &sessionCategory);
+6  A: 

Yes:

AudioSession.Initialize ();
AudioSession.Interrupted += delegate {
  Console.WriteLine ("Interrupted handler");
};
AudioSession.Category = AudioSessionCategory.MediaPlayback;
Geoff Norton