使用的软件:
1. Remote Phone Call (
https://www.justremotephone.com/ ) SDK 文档:RemotePhoneCallService API Reference (
https://www.justremotephone.com/sdk/Help/index.php ).
2. Quicker (
https://getquicker.net/ )
软件 1 的功能:电脑用蓝牙控制安卓手机打电话。软件 2 的功能:类似按键精灵。
想获取手机的通话状态,写了一段 C#代码:
using System.Windows.Forms;
using JustRemotePhone.RemotePhoneService;
public static PhoneState State { get; set;}
public static void Exec(Quicker.Public.IStepContext context)
{
string b=Convert.ToString(State);
MessageBox.Show(b);
}
SDK 文档说“PhoneState”这个是个枚举型,有( Idle ,OffHook ,Ringing ,Unknown )四个 Members 。
测试:
1.电脑和手机连接好后,不拨号,运行代码。弹窗显示"Idle"。
2.按下电脑上的拨号按键,让手机处于响铃状态,运行代码。弹窗显示"Idle"。
3.对方接通电话,运行代码。弹窗显示"Idle"。
请问大佬为什么不显示"Ringing"或者"OffHook"啥的?(不会编程代码瞎写的...)