简体   繁体   English

Android蓝牙低功耗配对显示/隐藏销已加载对话框

[英]Android Bluetooth low energy pairing show/hide Pin already loaded dialog

在此处输入图片说明

I am trying to write a simple android app that pairs to an nrf52 device(Bluetooth LOW ENERGY, not classic bluetooth). 我正在尝试编写一个与nrf52设备配对的简单android应用(蓝牙低能耗,而不是经典蓝牙)。 I would like the above image to pop up( I got this image from https://developer.android.com/guide/topics/connectivity/bluetooth.html ) 我想弹出上面的图像(我从https://developer.android.com/guide/topics/connectivity/bluetooth.html获得此图像)

But I am actually getting following image when I try to create bond/pair, how to make the above image show up instead of the below one? 但是,当我尝试创建绑定/对时,实际上正在得到以下图像,如何显示上面的图像而不是下面的图像? Or how do I setpin without any android prompt/notification coming up? 或者如何在没有任何Android提示/通知的情况下设置密码?

在此处输入图片说明

It turns out it is not something you can set on the android app. 事实证明,这不是您可以在android应用上设置的功能。 On the target device you need to make sure Bluetooth 4.2 is enabled, and set pairing option with displayYesNo. 在目标设备上,您需要确保已启用Bluetooth 4.2,并使用displayYesNo设置配对选项。 Take a look at https://www.rigado.com/inexpensive-secure-ble-devices/ 看看https://www.rigado.com/inexpensive-secure-ble-devices/

So now on my Google pixel 7.1.2, I will get a notification when I try to pair my target device, and if I click on the notification the 6 digit comfirmation screen would show up, and I can click "pair" or "cancel". 因此,现在在我的Google Pixel 7.1.2上,当我尝试与目标设备配对时,我会收到一条通知,如果单击该通知,将会显示6位数字的确认屏幕,并且我可以单击“配对”或“取消” ”。 But if your android phone is too old, it would fall back to asking you to enter 6 digit pins. 但是,如果您的Android手机太旧,则会退回要求您输入6位数的密码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM