0
我的應用程序使用麥克風錄製語音。我如何檢測(來自Monotouch代碼)是否啓用了設置中的麥克風(設置 - 隱私 - 麥克風)。MonoTouch檢測iPhone上是否啓用麥克風
用戶可以轉到設置並禁用麥克風。如果是這樣,那麼我想提醒用戶啓用麥克風。
我的應用程序使用麥克風錄製語音。我如何檢測(來自Monotouch代碼)是否啓用了設置中的麥克風(設置 - 隱私 - 麥克風)。MonoTouch檢測iPhone上是否啓用麥克風
用戶可以轉到設置並禁用麥克風。如果是這樣,那麼我想提醒用戶啓用麥克風。
AVAudioSession newsession = AVAudioSession.SharedInstance;
newsession.RequestRecordPermission(delegate(bool granted) {
// if granted is true you have access, otherwise you can display
// a message to the user asking them to enable the mic
});
AVAudioSession newsession = new AVAudioSession();在最新的iOS版本中已經過時。 – User382
看到我上面的編輯 – Jason