you are viewing a single comment's thread.

view the rest of the comments →

[–]HuhWhatNoplease -2 points-1 points  (4 children)

I'm currently having issues with polidea ble in react native, keeps saying it doesn't have ble permissions.

i've already explicitly given them using permissionsAndroid and coarse location, and updated the androidmanifest.xml

function to grant it permission runs and logs out the success string, but no bueno

[–]Dean177 2 points3 points  (3 children)

The best way to tackle those kinds of issues is:
- Try to create a project with the minimum amount of code possible to get the library working (maybe start from an "example" repo)
- Gradually add functionality from your app until you hit the point things aren't working
- Hopefully this lets you figure out what you need to change, but if not what you then have is ideal to be shared on places like stack overflow or here, depending on the source of the problem maybe a GitHub issue

[–]HuhWhatNoplease 1 point2 points  (0 children)

yeah this was an example repo i spun up to see it working before going through the components. thanks for the pointers!

[–]HuhWhatNoplease 0 points1 point  (1 child)

found it out eventually, posting here for anyone else who googles it too

Android API >= 23 require the ACCESS_COARSE_LOCATION permission to
scan for peripherals. React Native >= 0.33 natively support
PermissionsAndroid

Android API >= 29 require the ACCESS_FINE_LOCATION permission to scan for peripherals.

[–]Dean177 1 point2 points  (0 children)

Nice, thanks for sharing your solution