Closed medero closed 2 weeks ago
You have to use a development build https://docs.expo.dev/develop/development-builds/create-a-build/
You have to use a development build https://docs.expo.dev/develop/development-builds/create-a-build/
Thanks - I think I was confused because I could've sworn I tried a development build (with one of the.. 3-4 build commands - there are a few aliases) and it didn't work but will try a proper eos build. Any tips on speeding up eos builds?
You have to use a development build https://docs.expo.dev/develop/development-builds/create-a-build/
I updated the repo after making an EOS build and installing the app on my Phone and still no dice..
INFO never_ask_again INFO never_ask_again INFO never_ask_again INFO request android 31 INFO never_ask_again INFO never_ask_again INFO never_ask_again WARN Bluetooth permissions not granted.
Note: In my repo I nullified app.json's eas.projectId. It initially asked me for Location and I believe I granted it but now those default to never_ask_again.
Screenshot of the app:
I actually ended up getting this easily to work with react-native-ble-plx which had app.json with permissions set in android.permissions, tried to emulate it and no dice still. Even tried removing my initial call to requestPermissions on HomeScreen load and just am calling it on the Scan button Press incase Android sees that as "spammy" of requesting permissions and defaults it to a no.
Working react-native-ble-plx https://github.com/medero/react-native-ble-plx-example - it also uses the @config-plugins/react-native-ble-plx which seems like it could be the trick to why this works:
"@config-plugins/react-native-ble-plx",
{
"isBackgroundEnabled": true,
"modes": [
"peripheral",
"central"
],
"bluetoothAlwaysPermission": "Allow $(PRODUCT_NAME) to connect to bluetooth devices"
Would be curious to see if I missed anything with ble-manager here.
This is probably why https://blog.theodo.com/2023/07/ble-integration-for-rn-apps/ mentions it doesn't have support for Expo
@medero the example in the repo use expo.
Describe the bug When initiating BleManager.start I get 'cannot read property 'start' of null in Expo 51 / React Native 0.74.5 and thus unable to get permissions and scan devices (my goal is connecting to an Aranet4 device)
Implementation here: https://github.com/medero/react-native-ble-manager-expo-example/blob/main/app/(tabs)/index.tsx
To Reproduce Steps to reproduce the behavior:
Expected behavior Expectation is to not receive that error in order to establish bluetooth permissions and scan for devices.
Screenshots
Smartphone (please complete the following information):