I am trying to hide or disable the hud from showing up whenever you press the volume button. I am also trying to disable volume change whenever you press the volume button. This is in Xamarin.IOS please help me.
I was able to get a listener when you press the volume button but it only works if the volume changed, if the volume is at 0 it will not be triggered.
public override void ViewDidLoad()
{
base.ViewDidLoad();
var session = AVAudioSession.SharedInstance();
session.SetActive(true);
session.AddObserver(this, "outputVolume", NSKeyValueObservingOptions.New, IntPtr.Zero);
}
public override void ObserveValue(NSString keyPath, NSObject ofObject, NSDictionary change, IntPtr context)
{
MyCameraClass.StartScanning();
}