Skip to content

Commit

Permalink
Merge pull request #188 from shankari/improve_api29_tracking
Browse files Browse the repository at this point in the history
Multiple fixes for api 29 tracking from the CEO ebike project testing
  • Loading branch information
shankari authored Oct 26, 2020
2 parents a7ce668 + cf2ac37 commit 9fbb7be
Show file tree
Hide file tree
Showing 26 changed files with 952 additions and 397 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-em-datacollection",
"version": "1.4.5",
"version": "1.5.0",
"description": "The main tracking for the e-mission platform",
"license": "BSD-3-clause",
"cordova": {
Expand Down
9 changes: 8 additions & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
id="cordova-plugin-em-datacollection"
version="1.4.5">
version="1.5.0">

<name>DataCollection</name>
<description>Background data collection FTW! This is the part that I really
Expand Down Expand Up @@ -50,6 +50,7 @@

<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" />
<!-- COARSE_LOCATION obfuscates the location to a city block, change to FINE_LOCATION for accuracy -->
Expand Down Expand Up @@ -127,6 +128,7 @@
<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/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"/>
Expand All @@ -141,6 +143,9 @@
<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/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"/>
Expand Down Expand Up @@ -205,6 +210,7 @@
<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/Location/TripDiarySettingsCheck.h" target-dir="Location"/>
<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"/>
Expand All @@ -224,6 +230,7 @@
<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/Location/TripDiarySettingsCheck.m" target-dir="Location"/>
<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"/>
Expand Down
8 changes: 5 additions & 3 deletions res/android/values/dc_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
<string name="handling_geofence_exit">Handling geofence exit </string>
<!-- LocationChangeIntentService -->
<string name="recording_location">Recording location </string>
<!-- TripDiaryStateMachineForegroundService -->
<string name="trip_tracking_started">background trip tracking started </string>
<!-- TripDiaryStateMachineReceiver -->
<string name="new_data_collection_terms">New data collection terms - collection paused until consent</string>
<string name="battery_level">Interact with me! Battery level is %1$d</string>
Expand All @@ -28,10 +26,14 @@
<string name="failed_moving_new_state">Failed moving to %1$s</string>
<string name="location_permission_off_enable">Location permission off, click to enable</string>
<string name="background_loc_permission_off_enable">Background location permission off, click to enable</string>
<string name="activity_permission_off_enable">Activity permission off, click to enable</string>
<string name="error_location_settings">Error %1$d in location settings</string>
<string name="unknown_error_location_settings">Unknown error while reading location, please check your settings</string>
<string name="notify_curr_state">In state %1$s</string>
<!-- TripDiaryStateMachineForegroundService -->
<string name="foreground_killed_email_log">Foreground service killed, Profile -> Email Log for debugging</string>
<!-- ConfigManager -->
<string name="error_reading_stored_config">Error reading stored tracking config, reset to defaults</string>
<!-- DataCollectionPlugin -->
<string name="unable_resolve_issue">Unable to resolve issue</string>
<string name="unable_resolve_issue">Unrecoverable error in tracking. Profile -> Email Log for further investigation</string>
</resources>
6 changes: 5 additions & 1 deletion res/ios/en.lproj/DCLocalizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
"error-reading-activities" = "Error while reading activities";
"travel-mode-unavailable" = "Travel mode detection may be unavailable.";
"activity-detection-unsupported" = "Activity detection unsupported";
"travel-mode-unknown" = "Travel mode detection unavailable - all trips will be UNKNOWN.";
"activity-permission-problem" = "The app does not have permission to read your motion activities - automatic mode detection will not work. Please fix in Settings -> Privacy -> Motion & Fitness";
"travel-mode-unknown" = "Travel mode detection unavailable - all trips will be UNKNOWN.";
"bad-loc-tracking-problem" = "Background location accuracy is consistently poor - trip tracking may not work. Try to resolve the problem by turning location services, WiFi and cellular data off and on. If this message persists, please 'Email Log' for additional investigation";
"location-turned-off-problem" = "Location Services are turned off - trip tracking will not work. Try to resolve the problem by turning on location services (Settings -> Privacy)";
"location-permission-problem" = "The app does not have the 'always' permission - background trip tracking will not work. Please fix in Settings -> Privacy -> Location Services";
Loading

0 comments on commit 9fbb7be

Please sign in to comment.