1

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)

Red text in logcat (image)

Thank you for taking the time to read my first post! I truly appreciate any help you can provide.

  • 1
    You need to request this permission in runtime. Please check https://stackoverflow.com/a/34722591/3472904 The following question may helps as well: https://stackoverflow.com/q/33045581/3472904 – Anor Jul 28 '20 at 20:40
  • 1
    Thank you very much @Anor, this helped very much. It works now. – Vikram Bhatt Jul 29 '20 at 16:16
  • 1
    @Anor I know its stated elsewhere but Id post this as a solution / answer for others in the future. – Thomas Morris Jul 31 '20 at 07:27

1 Answers1

0

You need to request this permission in runtime.
More info: https://developer.android.com/training/permissions/requesting.html

Anor
  • 1,110
  • 13
  • 14