react-native-health-connect 1.0.3 → 1.0.4

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.
Files changed (3) hide show
  1. package/README.md +27 -0
  2. package/app.plugin.js +21 -0
  3. package/package.json +3 -2
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:
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.0.4",
4
4
  "description": "React native library for health connect (Android only)",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -69,7 +69,8 @@
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"