Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to API 29 #707

Merged
merged 1 commit into from
Aug 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Upgrade to API 29
Most of the changes were in the plugin, which we upgraded from version `1.4.4` to `1.4.5`.
The main change in here was to change the intro to specify the choice for android 10+ ("Always allow")

Other minor fixes:
- Fix the release script
  - Bump up the minSDK number
  - Fix the location of the production keystore
  - Fix the version of the buildtools used in the build
  - Change apk file names a bit since we build only one apk right now
shankari committed Aug 6, 2020
commit 94dd385c4c6a3de4a551c2e1eff55d0a7e729775
11 changes: 7 additions & 4 deletions bin/sign_and_align_keys.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#!/bin/bash

PROJECT=$1
VERSION=$2

if [[ $# -eq 0 ]]; then
echo "No arguments supplied"
exit 1
fi

# Sign and release the L+ version
# Make sure the highest supported version has the biggest version code
npx cordova build android --release -- --minSdkVersion=21
cp platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk platforms/android/app/build/outputs/apk/app-L+-release-signed-unaligned.apk
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ~/Safety_Infrastructure/MovesConnect/production.keystore ./platforms/android/app/build/outputs/apk/app-L+-release-signed-unaligned.apk androidproductionkey
~/Library/Android/sdk/build-tools/27.0.3/zipalign -v 4 platforms/android/app/build/outputs/apk/app-L+-release-signed-unaligned.apk cv-19-track-L+-build-$1.apk
npx cordova build android --release -- --minSdkVersion=22
cp platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../config_files/production.keystore ./platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk androidproductionkey
~/Library/Android/sdk/build-tools/30.0.1/zipalign -v 4 platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk $1-build-$2.apk
2 changes: 1 addition & 1 deletion config.cordovabuild.xml
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@
<platform name="android">
<hook src="hooks/before_build/android/android_copy_locales.js" type="before_build" />
<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="28" />
<preference name="android-targetSdkVersion" value="29" />
<preference name="AndroidXEnabled" value="true" />
<resource-file src="google-services.json" target="app/google-services.json" />
<hook src="hooks/before_build/android/android_set_provider.js" type="before_build" />
2 changes: 1 addition & 1 deletion package.cordovabuild.json
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@
"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.4.4",
"cordova-plugin-em-datacollection": "git+https://github.com/e-mission/e-mission-data-collection.git#v1.4.5",
"cordova-plugin-em-jwt-auth": "git+https://github.com/e-mission/cordova-jwt-auth.git#v1.6.2",
"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",
1 change: 1 addition & 0 deletions www/i18n/en.json
Original file line number Diff line number Diff line change
@@ -250,6 +250,7 @@
"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-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"
}
4 changes: 3 additions & 1 deletion www/js/intro.js
Original file line number Diff line number Diff line change
@@ -26,8 +26,10 @@ angular.module('emission.intro', ['emission.splash.startprefs',
if($scope.platform.toLowerCase() == "android") {
if($scope.osver < 6) {
$scope.locationPermExplanation = $translate.instant('intro.permissions.locationPermExplanation-android-lt-6');
} else {
} else if ($scope.osver < 10) {
$scope.locationPermExplanation = $translate.instant("intro.permissions.locationPermExplanation-android-gte-6");
} else {
$scope.locationPermExplanation = $translate.instant("intro.permissions.locationPermExplanation-android-gte-10");
}
}