Skip to content

Commit

Permalink
Merge pull request #759 from shankari/launch_app_settings_to_fix_perm…
Browse files Browse the repository at this point in the history
…issions

Redirect to app settings on newer versions of android and iOS
  • Loading branch information
shankari authored Jun 6, 2021
2 parents 1811495 + 755ad14 commit b08b4ea
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion config.cordovabuild.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="40" id="edu.berkeley.eecs.emission" ios-CFBundleVersion="40" version="2.9.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget android-versionCode="41" id="edu.berkeley.eecs.emission" ios-CFBundleVersion="41" version="3.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>emission</name>
<description>
A commute pattern tracker and carbon footprint estimator.
Expand Down
8 changes: 4 additions & 4 deletions package.cordovabuild.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "edu.berkeley.eecs.emission",
"version": "2.9.0",
"version": "3.0.0",
"displayName": "emission",
"license": "BSD-3-Clause",
"repository": {
Expand Down Expand Up @@ -72,10 +72,10 @@
"cordova-plugin-app-version": "0.1.9",
"cordova-plugin-customurlscheme": "5.0.1",
"cordova-plugin-device": "2.0.1",
"cordova-plugin-em-datacollection": "git+https://github.com/e-mission/e-mission-data-collection.git#v1.5.0",
"cordova-plugin-em-jwt-auth": "git+https://github.com/e-mission/cordova-jwt-auth.git#v1.6.3",
"cordova-plugin-em-datacollection": "git+https://github.com/e-mission/e-mission-data-collection.git#v1.6.0",
"cordova-plugin-em-jwt-auth": "git+https://github.com/e-mission/cordova-jwt-auth.git#v1.6.4",
"cordova-plugin-em-server-communication": "git+https://github.com/e-mission/cordova-server-communication.git#v1.2.3",
"cordova-plugin-em-serversync": "git+https://github.com/e-mission/cordova-server-sync.git#v1.2.4",
"cordova-plugin-em-serversync": "git+https://github.com/e-mission/cordova-server-sync.git#v1.2.5",
"cordova-plugin-em-settings": "git+https://github.com/e-mission/cordova-connection-settings.git#v1.2.2",
"cordova-plugin-em-transition-notify": "git+https://github.com/e-mission/e-mission-transition-notify.git#v1.2.6",
"cordova-plugin-em-unifiedlogger": "git+https://github.com/e-mission/cordova-unified-logger.git#v1.3.3",
Expand Down
7 changes: 4 additions & 3 deletions www/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,11 @@
"intro": {
"permissions": {
"locationPermExplanation-android-lt-6": "you accepted the permission during installation. You don't need to do anything now.",
"locationPermExplanation-android-gte-6": "please select 'allow'",
"locationPermExplanation-android-gte-10": "please select 'Allow all the time'",
"locationPermExplanation-android-6-9": "please select 'allow'",
"locationPermExplanation-android-10": "please select 'Allow all the time'",
"locationPermExplanation-android-gte-11": "please select 'Allow all the time' for location permissions on the app page",
"locationPermExplanation-ios-lt-13": "please select 'Always allow'. This allows us to understand your travel even when you are not actively using the app",
"locationPermExplanation-ios-gte-13": "please select 'when in use' now. After a few days, you will be asked whether you want to give the app background permission. Please say 'Always Allow' at that time. This allows us to understand your travel even when you are not actively using the app"
"locationPermExplanation-ios-gte-13": "please select 'always' and 'precise' in the app settings page and return here to continue"
}
},
"allow_background": {
Expand Down
6 changes: 4 additions & 2 deletions www/js/intro.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ angular.module('emission.intro', ['emission.splash.startprefs',
if($scope.osver < 6) {
$scope.locationPermExplanation = $translate.instant('intro.permissions.locationPermExplanation-android-lt-6');
} else if ($scope.osver < 10) {
$scope.locationPermExplanation = $translate.instant("intro.permissions.locationPermExplanation-android-gte-6");
$scope.locationPermExplanation = $translate.instant("intro.permissions.locationPermExplanation-android-6-9");
} else if ($scope.osver < 11) {
$scope.locationPermExplanation = $translate.instant("intro.permissions.locationPermExplanation-android-10");
} else {
$scope.locationPermExplanation = $translate.instant("intro.permissions.locationPermExplanation-android-gte-10");
$scope.locationPermExplanation = $translate.instant("intro.permissions.locationPermExplanation-android-gte-11");
}
}

Expand Down

0 comments on commit b08b4ea

Please sign in to comment.