forked from dariosalvi78/cordova-plugin-health
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.xml
executable file
·160 lines (131 loc) · 6.45 KB
/
plugin.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-health"
version="3.2.2">
<name>Cordova Health</name>
<description>
A plugin that abstracts fitness and health repositories Apple HealthKit and Google Health
Connect
</description>
<author>Dario Salvi, based on code by Eddy Verbruggen / Telerik</author>
<license>MIT</license>
<keywords>Health, HealthKit, Fit, Fitness, Health Connect</keywords>
<repo>https://github.com/dariosalvi78/cordova-plugin-health.git</repo>
<issue>https://github.com/dariosalvi78/cordova-plugin-health/issues</issue>
<engines>
<engine name="cordova" version=">=6.0.0" />
</engines>
<!-- ios -->
<platform name="ios">
<js-module src="www/ios/HealthKit.js" name="HealthKit">
<clobbers target="window.plugins.healthkit" />
</js-module>
<js-module src="www/ios/health.js" name="health">
<clobbers target="cordova.plugins.health" />
</js-module>
<config-file target="config.xml" parent="/*">
<feature name="HealthKit">
<param name="ios-package" value="HealthKit" />
</feature>
</config-file>
<!-- Commented this because it means you can't download/use the app on iOS devices that don't
support Apple Health (e.g. iPad) -->
<!-- See https://github.com/dariosalvi78/cordova-plugin-health/issues/59 -->
<!-- <config-file target="*-Info.plist" parent="UIRequiredDeviceCapabilities">
<array>
<string>healthkit</string>
</array>
</config-file> -->
<!-- Usage description of Health, mandatory since iOS 10 -->
<preference name="HEALTH_READ_PERMISSION" default="App needs to read data" />
<preference name="HEALTH_WRITE_PERMISSION" default="App needs to write data" />
<config-file target="*-Info.plist" parent="NSHealthShareUsageDescription">
<string>$HEALTH_READ_PERMISSION</string>
</config-file>
<config-file target="*-Info.plist" parent="NSHealthUpdateUsageDescription">
<string>$HEALTH_WRITE_PERMISSION</string>
</config-file>
<config-file target="*/Entitlements-Debug.plist" parent="com.apple.developer.healthkit">
<true />
</config-file>
<config-file target="*/Entitlements-Debug.plist" parent="com.apple.developer.healthkit.access">
<array />
</config-file>
<config-file target="*/Entitlements-Release.plist" parent="com.apple.developer.healthkit">
<true />
</config-file>
<config-file target="*/Entitlements-Release.plist" parent="com.apple.developer.healthkit.access">
<array />
</config-file>
<header-file src="src/ios/WorkoutActivityConversion.h" />
<source-file src="src/ios/WorkoutActivityConversion.m" />
<header-file src="src/ios/HKHealthStore+AAPLExtensions.h" />
<source-file src="src/ios/HKHealthStore+AAPLExtensions.m" />
<header-file src="src/ios/HealthKit.h" />
<source-file src="src/ios/HealthKit.m" />
<framework src="HealthKit.framework" weak="true" />
</platform>
<!-- android -->
<platform name="android">
<framework src="androidx.health.connect:connect-client:1.1.0-alpha02" />
<framework src="src/android/build-extras.gradle" custom="true" type="gradleReference" />
<config-file target="AndroidManifest.xml" parent="/*">
<!-- Check if Health Connect is installed -->
<queries>
<package android:name="com.google.android.apps.healthdata" />
</queries>
</config-file>
<config-file target="res/xml/config.xml" parent="/*">
<feature name="health">
<param name="android-package" value="org.apache.cordova.health.HealthPlugin" />
<!-- used to init the plugin when the cordova activity is created -->
<param name="onload" value="true" />
</feature>
<!-- <access origin="https://accounts.google.com/*" /> -->
</config-file>
<config-file target="AndroidManifest.xml" parent="/*/application">
<!-- For supported versions through Android 13, create an activity to show the rationale
of Health Connect permissions once users click the privacy policy link. -->
<activity
android:name="org.apache.cordova.health.PermissionsRationaleActivity"
android:exported="true">
<intent-filter>
<action android:name="androidx.health.ACTION_SHOW_PERMISSIONS_RATIONALE" />
</intent-filter>
</activity>
<!-- For versions starting Android 14, create an activity alias to show the rationale
of Health Connect permissions once users click the privacy policy link. -->
<activity-alias
android:name="ViewPermissionUsageActivity"
android:exported="true"
android:targetActivity="org.apache.cordova.health.PermissionsRationaleActivity"
android:permission="android.permission.START_VIEW_PERMISSION_USAGE">
<intent-filter>
<action android:name="android.intent.action.VIEW_PERMISSION_USAGE" />
<category android:name="android.intent.category.HEALTH_PERMISSIONS" />
</intent-filter>
</activity-alias>
</config-file>
<resource-file src="src/android/CordovaPluginHealthStrings.xml"
target="res/values/CordovaPluginHealthStrings.xml" />
<source-file src="src/android/HealthPlugin.java" target-dir="src/org/apache/cordova/health/" />
<source-file src="src/android/StepsFunctions.java" target-dir="src/org/apache/cordova/health/" />
<source-file src="src/android/WeightFunctions.java" target-dir="src/org/apache/cordova/health/" />
<source-file src="src/android/HeightFunctions.java" target-dir="src/org/apache/cordova/health/" />
<source-file src="src/android/NutritionFunctions.java"
target-dir="src/org/apache/cordova/health/" />
<source-file src="src/android/SleepFunctions.java" target-dir="src/org/apache/cordova/health/" />
<source-file src="src/android/BloodGlucoseFunctions.java"
target-dir="src/org/apache/cordova/health/" />
<source-file src="src/android/BloodPressureFunctions.java"
target-dir="src/org/apache/cordova/health/" />
<source-file src="src/android/HeartRateFunctions.java"
target-dir="src/org/apache/cordova/health/" />
<source-file src="src/android/PermissionsRationaleActivity.java"
target-dir="src/org/apache/cordova/health/" />
<source-file src="src/android/ActivityMapper.java" target-dir="src/org/apache/cordova/health/" />
<js-module src="www/android/health.js" name="health">
<clobbers target="cordova.plugins.health" />
</js-module>
</platform>
</plugin>