-
Notifications
You must be signed in to change notification settings - Fork 19
/
plugin.xml
297 lines (272 loc) · 18.3 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
<?xml version="1.0" encoding="utf-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
id="cordova-plugin-em-datacollection"
version="1.9.4">
<name>DataCollection</name>
<description>Background data collection FTW! This is the part that I really
spent time on. </description>
<author>K. Shankari ([email protected])</author>
<license>Modified BSD license</license>
<engines>
<engine name="cordova" version=">=3.6.0"/>
<engine name="cordova-android" version=">=7.0.0"/>
</engines>
<asset src="www/ui/ionic/templates/main-collect-settings.html" target="templates/control/main-collect-settings.html"/>
<asset src="www/ui/ionic/js/collect-settings.js" target="js/control/collect-settings.js"/>
<js-module src="www/datacollection.js" name="datacollection">
<clobbers target="cordova.plugins.BEMDataCollection" />
</js-module>
<!--
<js-module src="www/ui/ionic/js/collect-settings.js" name="collect-settings">
</js-module>
-->
<!--
Dependency checking on iOS does not work well - if the same dependency
exists in multiple files, it inserts them over and over and finally fails
<dependency id="edu.berkeley.eecs.emission.cordova.unifiedlogger"
url="https://github.com/e-mission/cordova-unified-logger.git"/>
<dependency id="edu.berkeley.eecs.emission.cordova.settings"
url="https://github.com/e-mission/cordova-connection-settings.git"/>
<dependency id="edu.berkeley.eecs.emission.cordova.serversync"
url="https://github.com/e-mission/cordova-server-sync.git"/>
-->
<hook type="after_plugin_install" src="hooks/android/addResourcesClassImport.js" />
<platform name="android">
<framework src="src/android/e-mission-datacollection.gradle" custom="true" type="gradleReference" />
<config-file target="res/xml/config.xml" parent="/*">
<feature name="DataCollection">
<param name="android-package" value="edu.berkeley.eecs.emission.cordova.tracker.DataCollectionPlugin"/>
<param name="onload" value="true"/>
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION"/>
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_HEALTH" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
<!-- COARSE_LOCATION obfuscates the location to a city block, change to FINE_LOCATION for accuracy -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<receiver
android:name="edu.berkeley.eecs.emission.cordova.tracker.BootReceiver"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" >
</action>
</intent-filter>
</receiver>
<receiver
android:name="edu.berkeley.eecs.emission.cordova.tracker.location.TripDiaryStateMachineReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="local.transition.initialize"></action>
<action android:name="local.transition.exited_geofence"></action>
<action android:name="local.transition.stopped_moving"></action>
<action android:name="local.transition.stop_tracking"></action>
<action android:name="local.transition.start_tracking"></action>
<action android:name="local.transition.ble_beacon_found"></action>
<action android:name="local.transition.ble_beacon_lost"></action>
<action android:name="local.transition.tracking_error"></action>
</intent-filter>
</receiver>
<service
android:name="edu.berkeley.eecs.emission.cordova.tracker.location.ActivityRecognitionChangeIntentService"
android:enabled="true"
android:exported="false">
</service>
<service
android:name="edu.berkeley.eecs.emission.cordova.tracker.location.OPGeofenceExitActivityIntentService"
android:enabled="true"
android:exported="false">
</service>
<service
android:name="edu.berkeley.eecs.emission.cordova.tracker.location.TripDiaryStateMachineService"
android:enabled="true"
android:exported="false">
</service>
<service
android:name="edu.berkeley.eecs.emission.cordova.tracker.location.TripDiaryStateMachineServiceOngoing"
android:enabled="true"
android:exported="false">
</service>
<service
android:name="edu.berkeley.eecs.emission.cordova.tracker.location.TripDiaryStateMachineForegroundService"
android:enabled="true"
android:foregroundServiceType="location|health"
android:exported="false">
</service>
<service
android:name="edu.berkeley.eecs.emission.cordova.tracker.location.GeofenceExitIntentService"
android:enabled="true"
android:exported="false">
</service>
<service
android:name="edu.berkeley.eecs.emission.cordova.tracker.location.LocationChangeIntentService"
android:enabled="true"
android:exported="false">
</service>
<service
android:name="edu.berkeley.eecs.emission.cordova.tracker.location.actions.GeofenceLocationIntentService"
android:enabled="true"
android:exported="false">
</service>
<service
android:name="edu.berkeley.eecs.emission.cordova.tracker.bluetooth.BluetoothService"
android:enabled="true"
android:exported="false">
</service>
<service
android:name="edu.berkeley.eecs.emission.cordova.tracker.bluetooth.BluetoothMonitoringService"
android:enabled="true"
android:exported="false">
</service>
</config-file>
<framework src="com.google.code.gson:gson:2.10.1"/>
<framework src="com.google.android.gms:play-services-location:$LOCATION_VERSION"/>
<preference name="LOCATION_VERSION" default="21.0.1"/>
<framework src="androidx.core:core:$ANDROIDX_CORE_VERSION"/>
<preference name="ANDROIDX_CORE_VERSION" default="1.8.0"/>
<framework src="androidx.work:work-runtime:$ANDROIDX_WORK_VERSION"/>
<preference name="ANDROIDX_WORK_VERSION" default="2.7.1"/>
<source-file src="src/android/DataCollectionPlugin.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker"/>
<source-file src="src/android/BootReceiver.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker"/>
<source-file src="src/android/Constants.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker"/>
<source-file src="src/android/ExplicitIntent.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker"/>
<source-file src="src/android/GooglePlayChecker.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker"/>
<source-file src="src/android/ConfigManager.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker"/>
<source-file src="src/android/location/ActivityRecognitionChangeIntentService.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/location"/>
<source-file src="src/android/location/OPGeofenceExitActivityIntentService.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/location"/>
<source-file src="src/android/location/OPGeofenceWalkExitWorker.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/location"/>
<source-file src="src/android/location/ForegroundServiceComm.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/location"/>
<source-file src="src/android/location/GeofenceExitIntentService.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/location"/>
<source-file src="src/android/location/LocationChangeIntentService.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/location"/>
<source-file src="src/android/location/TripDiaryStateMachineReceiver.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/location"/>
<source-file src="src/android/location/TripDiaryStateMachineService.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/location"/>
<source-file src="src/android/location/TripDiaryStateMachineServiceOngoing.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/location"/>
<source-file src="src/android/location/TripDiaryStateMachineForegroundService.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/location"/>
<source-file src="src/android/location/actions/ActivityRecognitionActions.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/location/actions"/>
<source-file src="src/android/location/actions/GeofenceActions.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/location/actions"/>
<source-file src="src/android/location/OPGeofenceExitActivityActions.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/location/actions"/>
<source-file src="src/android/location/actions/GeofenceLocationIntentService.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/location/actions"/>
<source-file src="src/android/location/actions/LocationTrackingActions.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/location/actions"/>
<source-file src="src/android/sensors/BatteryPollSensor.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/sensors"/>
<source-file src="src/android/sensors/BatteryUtils.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/sensors"/>
<source-file src="src/android/sensors/PollSensor.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/sensors"/>
<source-file src="src/android/sensors/PollSensorManager.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/sensors"/>
<source-file src="src/android/verification/SensorControlConstants.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/verification"/>
<source-file src="src/android/verification/SensorControlChecks.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/verification"/>
<source-file src="src/android/verification/SensorControlBackgroundChecker.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/verification"/>
<source-file src="src/android/verification/SensorControlForegroundDelegate.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/verification"/>
<source-file src="src/android/wrapper/Metadata.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/wrapper"/>
<source-file src="src/android/wrapper/SimpleLocation.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/wrapper"/>
<source-file src="src/android/wrapper/MotionActivity.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/wrapper"/>
<source-file src="src/android/wrapper/Transition.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/wrapper"/>
<source-file src="src/android/wrapper/LocationTrackingConfig.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/wrapper"/>
<source-file src="src/android/wrapper/Battery.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/wrapper"/>
<source-file src="src/android/wrapper/BluetoothBLE.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/wrapper"/>
<source-file src="src/android/wrapper/ConsentConfig.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/wrapper"/>
<source-file src="src/android/wrapper/Timer.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/wrapper"/>
<source-file src="src/android/wrapper/StatsEvent.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/wrapper"/>
<source-file src="src/android/bluetooth/BluetoothService.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/bluetooth"/>
<source-file src="src/android/bluetooth/BluetoothMonitoringService.java" target-dir="src/edu/berkeley/eecs/emission/cordova/tracker/bluetooth"/>
<resource-file src="res/android/statemachine.xml" target="res/values/statemachine.xml" />
<resource-file src="res/android/values/dc_strings.xml" target="res/values/dc_strings.xml"/>
</platform>
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="DataCollection">
<param name="ios-package" value="BEMDataCollection" />
<param name="onload" value="true"/>
</feature>
</config-file>
<config-file target="*-Info.plist" parent="UIBackgroundModes">
<array>
<string>remote-notification</string>
<string>location</string>
<string>fetch</string>
</array>
</config-file>
<config-file target="*-Info.plist" parent="NSLocationAlwaysAndWhenInUseUsageDescription">
<string>To create an automatic trip diary, "Precise" location access must be "Always" allowed</string>
</config-file>
<config-file target="*-Info.plist" parent="NSLocationAlwaysUsageDescription">
<string>To track your trips in the background, location access must be "Always" allowed</string>
</config-file>
<config-file target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
<string>To create an automatic trip diary, "Precise" location access must be allowed "While Using App"</string>
</config-file>
<config-file target="*-Info.plist" parent="NSMotionUsageDescription">
<string>To determine the modes of transportation during your trips, the app must access your phone's motion sensors</string>
</config-file>
<config-file target="*-Info.plist" parent="ITSAppUsesNonExemptEncryption">
<false/>
</config-file>
<config-file target="*-Info.plist" parent="NSBluetoothAlwaysUsageDescription">
<string>To interact with BLE beacons for the fleet version of the app, Bluetooth access is required</string>
</config-file>
<podspec>
<config>
<source url="https://cdn.cocoapods.org/"/>
</config>
<pods use-frameworks="true">
<pod name="Bolts/Tasks" spec="~> 1.9.1" />
</pods>
</podspec>
<framework src="CoreLocation.framework"/>
<header-file src="src/ios/BEMDataCollection.h"/>
<header-file src="src/ios/BEMAppDelegate.h"/>
<header-file src="src/ios/BEMRemotePushNotificationHandler.h"/>
<header-file src="src/ios/ConfigManager.h"/>
<header-file src="src/ios/Location/DataUtils.h" target-dir="Location"/>
<header-file src="src/ios/Location/GeofenceActions.h" target-dir="Location"/>
<header-file src="src/ios/Location/TripDiaryActions.h" target-dir="Location"/>
<header-file src="src/ios/Location/TripDiaryDelegate.h" target-dir="Location"/>
<header-file src="src/ios/Location/TripDiaryStateMachine.h" target-dir="Location"/>
<header-file src="src/ios/Verification/TripDiarySensorControlChecks.h" target-dir="Verification"/>
<header-file src="src/ios/Verification/SensorControlForegroundDelegate.h" target-dir="Verification"/>
<header-file src="src/ios/Verification/SensorControlBackgroundChecker.h" target-dir="Verification"/>
<header-file src="src/ios/Wrapper/Metadata.h" target-dir="Wrapper"/>
<header-file src="src/ios/Wrapper/MotionActivity.h" target-dir="Wrapper"/>
<header-file src="src/ios/Wrapper/SimpleLocation.h" target-dir="Wrapper"/>
<header-file src="src/ios/Wrapper/TimeQuery.h" target-dir="Wrapper"/>
<header-file src="src/ios/Wrapper/Transition.h" target-dir="Wrapper"/>
<header-file src="src/ios/Wrapper/LocationTrackingConfig.h" target-dir="Wrapper"/>
<header-file src="src/ios/Wrapper/Battery.h" target-dir="Wrapper"/>
<header-file src="src/ios/Wrapper/BluetoothBLE.h" target-dir="Wrapper"/>
<header-file src="src/ios/Wrapper/ConsentConfig.h" target-dir="Wrapper"/>
<header-file src="src/ios/Wrapper/Timer.h" target-dir="Wrapper"/>
<header-file src="src/ios/Wrapper/StatsEvent.h" target-dir="Wrapper"/>
<source-file src="src/ios/BEMDataCollection.m"/>
<source-file src="src/ios/BEMAppDelegate.m"/>
<source-file src="src/ios/ConfigManager.m"/>
<source-file src="src/ios/BEMRemotePushNotificationHandler.m"/>
<source-file src="src/ios/Location/DataUtils.m" target-dir="Location"/>
<source-file src="src/ios/Location/GeofenceActions.m" target-dir="Location"/>
<source-file src="src/ios/Location/TripDiaryActions.m" target-dir="Location"/>
<source-file src="src/ios/Location/TripDiaryDelegate.m" target-dir="Location"/>
<source-file src="src/ios/Location/TripDiaryStateMachine.m" target-dir="Location"/>
<source-file src="src/ios/Verification/TripDiarySensorControlChecks.m" target-dir="Verification"/>
<source-file src="src/ios/Verification/SensorControlForegroundDelegate.m" target-dir="Verification"/>
<source-file src="src/ios/Verification/SensorControlBackgroundChecker.m" target-dir="Verification"/>
<source-file src="src/ios/Wrapper/Metadata.m" target-dir="Wrapper"/>
<source-file src="src/ios/Wrapper/MotionActivity.m" target-dir="Wrapper"/>
<source-file src="src/ios/Wrapper/SimpleLocation.m" target-dir="Wrapper"/>
<source-file src="src/ios/Wrapper/TimeQuery.m" target-dir="Wrapper"/>
<source-file src="src/ios/Wrapper/Transition.m" target-dir="Wrapper"/>
<source-file src="src/ios/Wrapper/LocationTrackingConfig.m" target-dir="Wrapper"/>
<source-file src="src/ios/Wrapper/Battery.m" target-dir="Wrapper"/>
<source-file src="src/ios/Wrapper/BluetoothBLE.m" target-dir="Wrapper"/>
<source-file src="src/ios/Wrapper/ConsentConfig.m" target-dir="Wrapper"/>
<source-file src="src/ios/Wrapper/Timer.m" target-dir="Wrapper"/>
<source-file src="src/ios/Wrapper/StatsEvent.m" target-dir="Wrapper"/>
<resource-file src="res/ios/en.lproj/DCLocalizable.strings" target="en.lproj/DCLocalizable.strings"/>
</platform>
</plugin>