Exemplo n.º 1
0
 internal void SelectRole(BluetoothAudioRole role)
 {
     if (Globals.IsAudioInitialize)
     {
         int ret = Interop.Bluetooth.SelectAudioRole(role);
         if (ret != (int)BluetoothError.None && ret != (int)BluetoothError.AlreadyDone)
         {
             Log.Error(Globals.LogTag, "Failed to select audio role, Error - " + (BluetoothError)ret);
             BluetoothErrorFactory.ThrowBluetoothException(ret);
         }
     }
     else
     {
         BluetoothErrorFactory.ThrowBluetoothException((int)BluetoothError.NotInitialized);
     }
 }
Exemplo n.º 2
0
 static public void SelectRole(BluetoothAudioRole role)
 {
     BluetoothAudioImpl.Instance.SelectRole(role);
 }