Skip to content

Commit

Permalink
Merge pull request #73 from MediaComem/mobileapp/fix-gps-and-imrpove-…
Browse files Browse the repository at this point in the history
…flow

Release 0.1.3 for Mobile App
  • Loading branch information
verdonarthur authored Dec 10, 2020
2 parents bc36efc + cd87dca commit f29e5b9
Show file tree
Hide file tree
Showing 33 changed files with 387 additions and 473 deletions.
File renamed without changes.
10 changes: 5 additions & 5 deletions packages/mobile-app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
Expand All @@ -29,11 +29,11 @@ repositories {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation project(':capacitor-android')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation project(':capacitor-cordova-android-plugins')
}

Expand All @@ -46,4 +46,4 @@ try {
}
} catch(Exception e) {
logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</activity>

<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
Expand All @@ -9,4 +9,4 @@
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
2 changes: 1 addition & 1 deletion packages/mobile-app/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.google.gms:google-services:4.2.0'

// NOTE: Do not place your application dependencies here; they belong
Expand Down
2 changes: 2 additions & 0 deletions packages/mobile-app/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Jan 30 13:14:22 CST 2018
#Tue Dec 08 09:53:16 CET 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
26 changes: 19 additions & 7 deletions packages/mobile-app/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,20 @@
],
"styles": [
{
"input": "src/theme/variables.scss"
"input": "src/theme/variables.scss",
"inject": true
},
{
"input": "src/global.scss"
"input": "src/global.scss",
"inject": true
},
{
"input": "node_modules/@fortawesome/fontawesome-free/css/all.css"
"input": "node_modules/@fortawesome/fontawesome-free/css/all.css",
"inject": true
}
],
"scripts": []
"scripts": [],
"aot": true
},
"configurations": {
"production": {
Expand All @@ -55,9 +59,7 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
Expand All @@ -66,11 +68,21 @@
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
},
"ci": {
"progress": false
"progress": false,
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile-app/e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"target": "es2018",
"types": [
"jasmine",
"jasminewd2",
Expand Down
90 changes: 46 additions & 44 deletions packages/mobile-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"start": "ng serve",
"build": "ng build",
"build:android": "npx cap copy && npx cap update && npx cap open android",
"deploy:android": "npm run build && npm run build:android",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
Expand All @@ -16,63 +17,64 @@
},
"private": true,
"dependencies": {
"@angular/animations": "8.2.14",
"@angular/common": "~8.1.2",
"@angular/compiler": "~8.1.2",
"@angular/core": "~8.1.2",
"@angular/forms": "~8.1.2",
"@angular/platform-browser": "~8.1.2",
"@angular/platform-browser-dynamic": "~8.1.2",
"@angular/router": "~8.1.2",
"@capacitor/android": "^1.4.0",
"@capacitor/core": "^1.5.2",
"@fortawesome/fontawesome-free": "^5.13.0",
"@ionic-native/core": "^5.0.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic/angular": "^4.7.1",
"@ionic/storage": "^2.2.0",
"@angular/animations": "11.0.3",
"@angular/common": "~11.0.3",
"@angular/compiler": "~11.0.3",
"@angular/core": "~11.0.3",
"@angular/forms": "~11.0.3",
"@angular/platform-browser": "~11.0.3",
"@angular/platform-browser-dynamic": "~11.0.3",
"@angular/router": "~11.0.3",
"@capacitor/android": "^2.4.4",
"@capacitor/core": "^1.5.3",
"@fortawesome/fontawesome-free": "^5.15.1",
"@ionic-native/core": "^5.30.0",
"@ionic-native/splash-screen": "^5.30.0",
"@ionic-native/status-bar": "^5.30.0",
"@ionic/angular": "^5.5.1",
"@ionic/storage": "^2.3.1",
"@ngx-translate/core": "^12.1.2",
"@ngx-translate/http-loader": "^4.0.0",
"cordova-android": "8.1.0",
"core-js": "^2.5.4",
"rxjs": "~6.5.1",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
"cordova-android": "^9.0.0",
"core-js": "^2.6.12",
"leaflet": "^1.7.1",
"rxjs": "~6.6.3",
"tslib": "^2.0.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/architect": "~0.801.2",
"@angular-devkit/build-angular": "^0.803.24",
"@angular-devkit/core": "~8.1.2",
"@angular-devkit/schematics": "~8.1.2",
"@angular/cli": "~8.1.2",
"@angular/compiler": "~8.1.2",
"@angular/compiler-cli": "~8.1.2",
"@angular/language-service": "~8.1.2",
"@capacitor/cli": "^1.5.2",
"@ionic/angular-toolkit": "~2.0.0",
"@ionic/cli": "^6.10.1",
"@types/jasmine": "~3.3.8",
"@angular-devkit/build-angular": "~0.1100.3",
"@angular-devkit/core": "~11.0.3",
"@angular-devkit/schematics": "~11.0.3",
"@angular/cli": "~11.0.3",
"@angular/compiler-cli": "~11.0.3",
"@angular/language-service": "~11.0.3",
"@capacitor/cli": "^1.5.3",
"@ionic/angular-toolkit": "^3.0.0",
"@ionic/cli": "^6.12.2",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "^5.0.0",
"@types/leaflet": "^1.5.19",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.1.3",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.4.3"
"tslint": "~6.1.0",
"typescript": "~4.0.5"
},
"description": "An Ionic project",
"cordova": {
Expand Down
40 changes: 27 additions & 13 deletions packages/mobile-app/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ export class IsSignedInGuard implements CanActivate {

const routes: Routes = [
{ path: '', redirectTo: 'login', pathMatch: 'full' },
{ path: 'login', loadChildren: './login/login.module#LoginPageModule' },
{
path: 'login',
loadChildren: () =>
import('./login/login.module').then((m) => m.LoginPageModule),
},
{
path: 'home',
loadChildren: () =>
Expand All @@ -42,36 +46,46 @@ const routes: Routes = [
children: [
{
path: 'select-obstacle',
loadChildren:
'./contribution/select-obstacle/select-obstacle.module#SelectObstaclePageModule',
loadChildren: () =>
import('./contribution/select-obstacle/select-obstacle.module').then(
(m) => m.SelectObstaclePageModule
),
},
{
path: 'take-picture/:obstacle',
loadChildren:
'./contribution/take-picture/take-picture.module#TakePicturePageModule',
loadChildren: () =>
import('./contribution/take-picture/take-picture.module').then(
(m) => m.TakePicturePageModule
),
},
{
path: 'set-global-position',
loadChildren:
'./contribution/set-global-position/set-global-position.module#SetGlobalPositionPageModule',
path: 'set-position',
loadChildren: () =>
import(
'./contribution/set-global-position/set-global-position.module'
).then((m) => m.SetGlobalPositionPageModule),
},
{
path: 'obstacle-summary',
loadChildren:
'./contribution/obstacle-summary/obstacle-summary.module#ObstacleSummaryPageModule',
loadChildren: () =>
import(
'./contribution/obstacle-summary/obstacle-summary.module'
).then((m) => m.ObstacleSummaryPageModule),
},
{
path: 'feedback',
loadChildren:
'./contribution/feedback/feedback.module#FeedbackPageModule',
loadChildren: () =>
import('./contribution/feedback/feedback.module').then(
(m) => m.FeedbackPageModule
),
},
],
},
];

@NgModule({
imports: [
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }),
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules, relativeLinkResolution: 'legacy' }),
],
exports: [RouterModule],
})
Expand Down
47 changes: 0 additions & 47 deletions packages/mobile-app/src/app/app.component.spec.ts

This file was deleted.

Loading

0 comments on commit f29e5b9

Please sign in to comment.