检查是否在Delphi XE7中启用或禁用了Android蓝牙


本文整理自网络,侵删。

 
uses
  Androidapi.JNI.Bluetooth;

procedure TForm2.Button1Click(Sender: TObject);
var
  Adapter: JBluetoothAdapter;
begin
  Adapter := TJBluetoothAdapter.JavaClass.getDefaultAdapter;
  if Adapter.isEnabled then
    ShowMessage('Bluetooth有效。')
  else
    ShowMessage('Bluetooth无效。');
end;

相关阅读 >>

Delphi 基础计算两数之合

Delphi try 抛出异常消息

Delphi xe6 android下捕获功能键

Delphi access中只取时间的日期部分的函数

Delphi webbrowser多次执行documentcomplete

Delphi opendialog1文件过滤类型

Delphi tidhttp+tidssliohandlersocket+ssl

Delphi如何自动重启程序

Delphi通过wmi获取系统信息

Delphi运行时的问题,cannot focus a disabled or invisible window!

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...