本文整理自网络,侵删。
uses Androidapi.JNI.Bluetooth;
procedure TForm2.Button2Click(Sender: TObject);var Adapter: JBluetoothAdapter;begin Adapter := TJBluetoothAdapter.JavaClass.getDefaultAdapter; if Adapter.enable then ShowMessage('Bluetooth已启用') else ShowMessage('无法启用');end;
相关阅读 >>
Delphi 新建文件 复制文件 重命名文件名时 文件存在自动重命名
Delphi tstringlist stringlist的特殊用法
Delphi d10.x安卓app开发中简单使用原生toast
更多相关阅读请进入《Delphi》频道 >>