如何在Delphi中调用Android上的Bluetooth设置的本机窗口? [英] How to call the native window of Bluetooth settings on Android in Delphi?

查看:95
本文介绍了如何在Delphi中调用Android上的Bluetooth设置的本机窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看过一个应用程序,其蓝牙设置调用了Android蓝牙设置的本机窗口.当用户按下Android后退按钮时,它将返回到应用程序.如何调用Delphi中的本机蓝牙设置"窗口?

I've seen an app where its Bluetooth settings calls the native window of Android Bluetooth settings. When the user press Android Back button, it returns to the app. How does this call the native Bluetooth settings window in Delphi?

推荐答案

按照:

uses
  Androidapi.JNI.GraphicsContentViewText, Androidapi.JNI.Provider, Androidapi.Helpers;

procedure TForm1.Button1Click(Sender: TObject);
var
  LIntent: JIntent;
begin
  LIntent := TJIntent.Create;
  LIntent.setComponent(TJComponentName.JavaClass.init(StringToJString('com.android.settings'), StringToJString('com.android.settings.bluetooth.BluetoothSettings')));
  TAndroidHelper.Context.startActivity(LIntent);
end;

这篇关于如何在Delphi中调用Android上的Bluetooth设置的本机窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆