java - Sparkfun nRF52832 breakout board not connecting to BluetoothLeGatt source code from Android Studio
问题描述
I am trying to pair my Sparkfun nRF52832 breakout board (programed through Arduino, using this link: nRF52832 Breakout Board Hookup Guide with a BLE android app (which I hope to make) so that I can turn on/off the LED on the board (baby steps). Since I am new to Bluetooth LE, I decided to use the BluetoothLeGatt source code on Android Studio. After going through the code, I understand how it works.
Picture of the BluetoothLeGatt source code sample page (image)
I connected my Samsung Galaxy S8+ and installed the BluetoothLeGatt source app to see if it can scan for the nRF52832. At first I got a red text in the logcat which said that I needed to give Coarse location permission, so I did that in the manifest.xml. Then I ran it again, but I still got the same red text in the logcat.
At first I googled the problem and found this somewhat similar question, however, I wasn't able to get a suitable answer. I also tried to see if I could find source code for the nRF connect app, however, that is also not available. So I'm super confused about what I should do to get rid of that and need help.
manifest.xml file with permissions (image)
Thank you for taking the time to read my first post! I truly appreciate any help you can provide.
解决方案
您需要在运行时请求此权限。
更多信息:https ://developer.android.com/training/permissions/requesting.html
推荐阅读
- java - 获取“”侧的原始字符串
- javascript - cy.get() 是否有可能阻止 iframe 加载?
- asp.net - 启动项目 ASP.NET Core 3.1 后在运行时添加程序集控制器和视图
- reactjs - 使用 Async/Await 获取数据时遇到问题
- python - 使用 discord.py 识别并保存特定频道中的 Spotify 链接
- static-site - 十一:在站点地图的永久链接中生成每个类别
- python - 如何从熊猫数据框中的现有列创建新列
- javascript - 页面加载VUE时的onload方法
- php - 为什么我在 Laravel 中收到此错误?错误:-函数 Darryldecode\Cart\Cart::updateQuantityRelative() 的参数太少
- api - 获取授权码流的 Oauth 2.0 令牌