@biqprotocol/react-native
v0.0.26
Published
SDK for interacting with BIQ protocol
Maintainers
Readme
biq-sdk-react-native
Feedback:
- [Android] Eventul onBluetoothStateChange nu se triggeruieste decat daca startPresence e on. Ar trebui sa functioneze indiferent de starea prezentei.
- [Android] In timp ce presence e on, daca dezactivez bluetooth se pune pe paused insa nu revine la scanning in progress (nici scan state nici sdk state) dupa bluetooth on desi scaneaza. Cu toate astea, a functionat complet doar prima data, a 2-a oara doar a facut update la sdk&scan state dar nu a si validat. Flow-ul a fost cam asa (app in foreground sau background dar ecran pornit):
- Beacon offline
- bluetooth on
- startPresence
- bluetooth off (sdk&scan paused)
- bluetooth on (no update la sdk&scan)
- Beacon online
- validare
- Bluetooth off (sdk&scan paused)
- Bluetooth on (no update la sdk&scan)
- dupa 5 min sdk&scan au devenit in progress dar nu a facut validare
- dupa alte 5 minute a facut validare
- [Android] Nu am testat cu app in background
- [iOS] La fel ca pe Android, daca dezactivez bluetooth in timp ce este scanning in progress nu face update la scan&sdk state desi scaneaza.
- [iOS] Acelasi test case ca pe Android nu a produs decat validarea initiala apoi nu a mai functionat nici dupa 15 minute. In plus, sdk&scan state a ramas paused dupa bluetooth off/onn dupa prima validare.
- [iOS] Cand bluetooth revine pe on, sdk&scan state se modifica mereu in paused chiar daca nu e pornita prezenta
- [iOS] Cu app in background si startPresence on, la bluetooth off am primit 2 actualizari de sdk&scan, prima cu paused si a 2-a cu in progress. Dupa bluetooth on a facut validare dupa ce am pornit beacon-ul.
BIQ SDK for React Native (Expo module)
Development
Expo module
Inside project's root:
- Install dependencies
npm install- Build plugin - run after making changes to plugin in /plugin
npm run prepare- Build module and watch for changes
npm run buildExample app
Inside /example folder:
- Install dependencies
npm install- Configure Expo modules - run after making changes to module's plugin or /example/app.json
npx expo prebuildMight also require pod reinstalation for iOS:
cd ios
pod install- [optional] Run on Android emulator (BLE features will not work on emulator, but it is useful for testing the build process)
npx expo run:android- [optional] Run on Android device
npx expo run:android --device- [optional] Build Android apk in /example/android/app/build/outputs/apk/release/app-release.apk
npm run build:androidRequesting iOS permissions
At the moment we use react-native-permissions to request Android and iOS permissions. This is now a required peer dependency and needs to be installed in the app implementing the SDK:
npm i @biqprotocol/react-native react-native-permissionsThis is because Expo will not autolink a module if it is not present in the dependencies section of the react-native application.
