亚行:如何自动完成完整的BT扫描,配对和连接 [英] ADB: How to automate complete BT Scan, pair and connect

查看:110
本文介绍了亚行:如何自动完成完整的BT扫描,配对和连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找使用ADB自动化以下活动的方法。

I am looking for Automating the below activities using ADB.

蓝牙设置-> TunrnOn BT->配对(到我可以设置的BT mac地址)->在某些配置文件(如A2DP / HFP)上连接到BT设备。

Bluetooth settings -> TunrnOn BT -> Pairing (To a BT mac address which i can set) -> Connect to the BT Device on certain profiles like A2DP/HFP.

我已经找到此处此处如何打开电源并将BT设置为可使用ADB进行发现。但是我仍然停留在如何使用ADB再次发出连接请求上。

I have already found here and here how to turn on and set BT to discoverable using ADB. But I am still stuck on how to make a connection request again using ADB.

是否有一种方法可以完全自动化这些步骤。

Would there be a way to completely automate these steps.

感谢您的宝贵意见。

推荐答案

仅使用ADB无法解决。
但是使用ui automator仍然有可能。
https://developer.android.com/training/testing/ui-自动化器

There is no solution possible only using ADB. But there still is a possibility using ui automator. https://developer.android.com/training/testing/ui-automator

这篇关于亚行:如何自动完成完整的BT扫描,配对和连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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