react-native-health-connect 1.0.3 → 1.1.0

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/README.md CHANGED
@@ -54,6 +54,29 @@ Then add the prebuild [config plugin](https://docs.expo.io/guides/config-plugins
54
54
  }
55
55
  ```
56
56
 
57
+ - Edit your app.json again and add this
58
+
59
+ ```json
60
+ {
61
+ "expo": {
62
+ ...
63
+ "plugins": [
64
+ [
65
+ "expo-build-properties",
66
+ {
67
+ "android": {
68
+ "compileSdkVersion": 33,
69
+ "targetSdkVersion": 33,
70
+ "minSdkVersion": 26
71
+ },
72
+ }
73
+ ]
74
+ ]
75
+ ...
76
+ }
77
+ }
78
+ ```
79
+
57
80
  Then rebuild the native app:
58
81
 
59
82
  - Run `expo prebuild`
@@ -63,6 +86,10 @@ Then rebuild the native app:
63
86
 
64
87
  > If the project doesn't build correctly with `yarn android`, please file an issue and try setting the project up manually.
65
88
 
89
+ Finally create a new EAS development build
90
+
91
+ `eas build --profile development --platform android`
92
+
66
93
  ## Example
67
94
 
68
95
  A quick example at a glance:
@@ -34,6 +34,12 @@ def getExtOrIntegerDefault(name) {
34
34
  }
35
35
 
36
36
  android {
37
+ def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
38
+ // Check AGP version for backward compatibility reasons
39
+ if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
40
+ namespace = "dev.matinzd.healthconnect"
41
+ }
42
+
37
43
  compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
38
44
 
39
45
  defaultConfig {
package/app.plugin.js ADDED
@@ -0,0 +1,21 @@
1
+ const { withAndroidManifest } = require('@expo/config-plugins');
2
+
3
+ const withHealthConnect = function androidManifestPlugin(config) {
4
+ return withAndroidManifest(config, async (config) => {
5
+ let androidManifest = config.modResults.manifest;
6
+
7
+ androidManifest.application[0].activity[0]['intent-filter'].push({
8
+ action: [
9
+ {
10
+ $: {
11
+ 'android:name': 'androidx.health.ACTION_SHOW_PERMISSIONS_RATIONALE',
12
+ },
13
+ },
14
+ ],
15
+ });
16
+
17
+ return config;
18
+ });
19
+ };
20
+
21
+ module.exports = withHealthConnect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-health-connect",
3
- "version": "1.0.3",
3
+ "version": "1.1.0",
4
4
  "description": "React native library for health connect (Android only)",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -69,14 +69,16 @@
69
69
  "!**/__tests__",
70
70
  "!**/__fixtures__",
71
71
  "!**/__mocks__",
72
- "!**/.*"
72
+ "!**/.*",
73
+ "app.plugin.js"
73
74
  ],
74
75
  "resolutions": {
75
76
  "@types/react": "17.0.21"
76
77
  },
77
78
  "peerDependencies": {
78
79
  "react": "*",
79
- "react-native": "*"
80
+ "react-native": "*",
81
+ "@expo/config-plugins": ">= 6.0.2"
80
82
  },
81
83
  "engines": {
82
84
  "node": ">= 16.0.0"
@@ -159,8 +161,5 @@
159
161
  "extends": [
160
162
  "@commitlint/config-conventional"
161
163
  ]
162
- },
163
- "dependencies": {
164
- "@expo/config-plugins": "^6.0.2"
165
164
  }
166
165
  }