@getquip/expo-nordic-dfu 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/conf-traffic.yml +2 -0
- package/README.md +20 -4
- package/example/README.md +1 -0
- package/example/package-lock.json +536 -809
- package/example/package.json +8 -8
- package/package.json +10 -10
- package/example/android/app/build.gradle +0 -182
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +0 -14
- package/example/android/app/src/debug/AndroidManifest.xml +0 -7
- package/example/android/app/src/debugOptimized/AndroidManifest.xml +0 -7
- package/example/android/app/src/main/AndroidManifest.xml +0 -34
- package/example/android/app/src/main/java/expo/modules/nordicdfu/example/MainActivity.kt +0 -61
- package/example/android/app/src/main/java/expo/modules/nordicdfu/example/MainApplication.kt +0 -56
- package/example/android/app/src/main/res/drawable/ic_launcher_background.xml +0 -6
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -37
- package/example/android/app/src/main/res/drawable-hdpi/splashscreen_logo.png +0 -0
- package/example/android/app/src/main/res/drawable-mdpi/splashscreen_logo.png +0 -0
- package/example/android/app/src/main/res/drawable-xhdpi/splashscreen_logo.png +0 -0
- package/example/android/app/src/main/res/drawable-xxhdpi/splashscreen_logo.png +0 -0
- package/example/android/app/src/main/res/drawable-xxxhdpi/splashscreen_logo.png +0 -0
- package/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +0 -5
- package/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +0 -5
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
- package/example/android/app/src/main/res/values/colors.xml +0 -6
- package/example/android/app/src/main/res/values/strings.xml +0 -5
- package/example/android/app/src/main/res/values/styles.xml +0 -11
- package/example/android/app/src/main/res/values-night/colors.xml +0 -1
- package/example/android/build.gradle +0 -24
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/example/android/gradle.properties +0 -65
- package/example/android/gradlew +0 -251
- package/example/android/gradlew.bat +0 -94
- package/example/android/settings.gradle +0 -39
- package/example/ios/.xcode.env +0 -11
- package/example/ios/Podfile +0 -60
- package/example/ios/Podfile.lock +0 -2123
- package/example/ios/Podfile.properties.json +0 -5
- package/example/ios/exponordicdfuexample/AppDelegate.swift +0 -70
- package/example/ios/exponordicdfuexample/Images.xcassets/AppIcon.appiconset/App-Icon-1024x1024@1x.png +0 -0
- package/example/ios/exponordicdfuexample/Images.xcassets/AppIcon.appiconset/Contents.json +0 -14
- package/example/ios/exponordicdfuexample/Images.xcassets/Contents.json +0 -6
- package/example/ios/exponordicdfuexample/Images.xcassets/SplashScreenBackground.colorset/Contents.json +0 -20
- package/example/ios/exponordicdfuexample/Images.xcassets/SplashScreenLegacy.imageset/Contents.json +0 -23
- package/example/ios/exponordicdfuexample/Images.xcassets/SplashScreenLegacy.imageset/image.png +0 -0
- package/example/ios/exponordicdfuexample/Images.xcassets/SplashScreenLegacy.imageset/image@2x.png +0 -0
- package/example/ios/exponordicdfuexample/Images.xcassets/SplashScreenLegacy.imageset/image@3x.png +0 -0
- package/example/ios/exponordicdfuexample/Info.plist +0 -78
- package/example/ios/exponordicdfuexample/PrivacyInfo.xcprivacy +0 -48
- package/example/ios/exponordicdfuexample/SplashScreen.storyboard +0 -48
- package/example/ios/exponordicdfuexample/Supporting/Expo.plist +0 -12
- package/example/ios/exponordicdfuexample/exponordicdfuexample-Bridging-Header.h +0 -3
- package/example/ios/exponordicdfuexample/exponordicdfuexample.entitlements +0 -5
- package/example/ios/exponordicdfuexample.xcodeproj/project.pbxproj +0 -546
- package/example/ios/exponordicdfuexample.xcodeproj/xcshareddata/xcschemes/exponordicdfuexample.xcscheme +0 -88
- package/example/ios/exponordicdfuexample.xcworkspace/contents.xcworkspacedata +0 -10
package/README.md
CHANGED
|
@@ -14,23 +14,32 @@ This project does not provide an interface for scanning/connecting devices via B
|
|
|
14
14
|
- Android 14+
|
|
15
15
|
- iOS 17+
|
|
16
16
|
- Expo SDK 54
|
|
17
|
-
- React Native Bridgeless (new architecture) enabled
|
|
17
|
+
- React Native Bridgeless (new architecture) enabled (this is enabled by default in Expo 54+)
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Setup
|
|
20
|
+
|
|
21
|
+
### Install
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
```bash
|
|
24
|
+
// NPM projects
|
|
25
|
+
npm install @getquip/expo-nordic-dfu --save
|
|
26
|
+
// Yarn projects
|
|
27
|
+
yarn add @getquip/expo-nordic-dfu
|
|
28
|
+
```
|
|
22
29
|
|
|
23
30
|
### Bluetooth permissions
|
|
24
31
|
|
|
25
|
-
You need the various Bluetooth
|
|
32
|
+
You need the various Bluetooth permissions enabled on your Expo project. If you use a Bluetooth management library like [react-native-ble-manager](https://github.com/innoveit/react-native-ble-manager), this might be done for you. For android, you also need Foreground Services enabled for the DFU process.
|
|
26
33
|
|
|
27
34
|
```typescript
|
|
28
35
|
// Expo app.json
|
|
29
36
|
|
|
30
37
|
// Android
|
|
31
38
|
expo.android.permissions: [
|
|
39
|
+
// Specifically for DFU
|
|
32
40
|
"android.permission.FOREGROUND_SERVICE",
|
|
33
41
|
"android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE",
|
|
42
|
+
// Needed for Bluetooth operations
|
|
34
43
|
"android.permission.BLUETOOTH",
|
|
35
44
|
"android.permission.BLUETOOTH_SCAN", // You might need to set "neverForLocation"
|
|
36
45
|
"android.permission.BLUETOOTH_ADMIN",
|
|
@@ -39,11 +48,16 @@ expo.android.permissions: [
|
|
|
39
48
|
|
|
40
49
|
// iOS
|
|
41
50
|
expo.ios.infoPlist: [
|
|
51
|
+
// Needed for Bluetooth operations
|
|
42
52
|
"NSBluetoothAlwaysUsageDescription": "Uses Bluetooth to connect to Bluetooth enabled device.",
|
|
43
53
|
"NSBluetoothPeripheralUsageDescription": "Uses Bluetooth to connect to Bluetooth enabled device.",
|
|
44
54
|
]
|
|
45
55
|
```
|
|
46
56
|
|
|
57
|
+
## Usage
|
|
58
|
+
|
|
59
|
+
Please see the [example app](example)!
|
|
60
|
+
|
|
47
61
|
### Listeners
|
|
48
62
|
|
|
49
63
|
The listeners work mostly the same as the original @ [Pilloxa/react-native-nordic-dfu](https://github.com/Pilloxa/react-native-nordic-dfu)
|
|
@@ -52,6 +66,7 @@ The listeners work mostly the same as the original @ [Pilloxa/react-native-nordi
|
|
|
52
66
|
- `DFUStateChanged`: Reports back when major DFU flow miletones happen. It will also tell you if the DFU finished, failed or was aborted
|
|
53
67
|
|
|
54
68
|
```typescript
|
|
69
|
+
// See the type file src/ExpoNordicDfu.types.ts for schema
|
|
55
70
|
ExpoNordicDfu.module.addListener('DFUProgress', (progress) => {
|
|
56
71
|
console.info('DFUProgress:', progress)
|
|
57
72
|
})
|
|
@@ -69,6 +84,7 @@ await ExpoNordicDfu.startDfu({
|
|
|
69
84
|
deviceAddress,
|
|
70
85
|
fileUri,
|
|
71
86
|
// There are many optional parameters and some are OS-specific
|
|
87
|
+
// The values we support are listed in src/ExpoNordicDfu.types.ts
|
|
72
88
|
// ...,
|
|
73
89
|
// android: {
|
|
74
90
|
// ...
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
See [parent README](../README.md#example-app)
|