/// <summary> /// Dials (does not call) a phone number on the Android device /// </summary> /// <param name="phoneNumber">Phone number to dial</param> public void DialPhoneNumber(string phoneNumber) { if (this.device.State != DeviceState.ONLINE) return; AdbCommand adbCmd = Adb.FormAdbShellCommand(this.device, false, "service", "call", "phone", "1", "s16", phoneNumber); Adb.ExecuteAdbCommandNoReturn(adbCmd); }
/// <summary> /// Calls a phone number on the Android device /// </summary> /// <param name="phoneNumber">Phone number to call</param> public void CallPhoneNumber(string phoneNumber) { if (this.device.State != DeviceState.ONLINE) return; AdbCommand adbCmd = Adb.FormAdbShellCommand(this.device, false, "service", "call", "phone", "2", "s16", phoneNumber); Adb.ExecuteAdbCommandNoReturn(adbCmd); adbCmd = Adb.FormAdbShellCommand(this.device, false, "input", "keyevent", (int)KeyEventCode.BACK); Adb.ExecuteAdbCommandNoReturn(adbCmd); }