Skip to content

Commit

Permalink
Merge pull request #646 from RADAR-base/staging-app-2
Browse files Browse the repository at this point in the history
Release 0.6.4
  • Loading branch information
mpgxvii authored Aug 13, 2019
2 parents 2476f2c + 0431e39 commit 27925f5
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 117 deletions.
204 changes: 101 additions & 103 deletions config.xml
Original file line number Diff line number Diff line change
@@ -1,105 +1,103 @@
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="530" id="org.phidatalab.radar_armt" version="0.6.4-alpha"
xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>RADAR Questionnaire</name>
<description>An application that collects active data for research.</description>
<author email="[email protected]" href="http://radar-cns.org/">RADAR-CNS</author>
<content src="index.html" />
<access origin="*" />
<access origin="*" subdomains="true" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<icon src="resources/android/icon/drawable-xhdpi-icon.png" />
<preference name="DisallowOverscroll" value="true" />
<preference name="BackgroundColor" value="0xff6d9aa5" />
<preference name="Orientation" value="portrait" />
<platform name="android">
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" />
<allow-intent href="market:*" />
<preference name="android-minSdkVersion" value="21" />
<preference name="AndroidLaunchMode" value="singleTop" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenBackgroundColor" value="0xff6d9aa5" />
<preference name="FadeSplashScreen" value="true" />
<preference name="FadeSplashScreenDuration" value="1000" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="LoadUrlTimeoutValue" value="700000" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="SplashScreenSpinnerColor" value="0xffffffff" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<allow-navigation href="*" />
<allow-navigation href="http://10.40.189.168:8101" />
<allow-navigation href="http://10.40.189.168:8100" />
<allow-navigation href="http://10.40.177.195:8101" />
<allow-navigation href="http://10.40.177.195:8100" />
<allow-navigation href="http://10.40.140.19:8100" />
<allow-navigation href="http://172.20.10.5:8100" />
<allow-navigation href="http://10.41.163.140:8100" />
<allow-navigation href="http://10.40.230.126:8100" />
<allow-navigation href="http://10.40.149.14:8100" />
<allow-navigation href="http://10.40.149.14:8101" />
<allow-navigation href="http://172.20.10.5:8101" />
<allow-navigation href="http://10.236.23.88:8100" />
<allow-navigation href="http://172.20.20.20:8100" />
<allow-navigation href="http://10.0.0.150:8100" />
<allow-navigation href="http://10.35.12.253:8100" />
<allow-navigation href="http://10.35.12.253:8101" />
<allow-navigation href="http://169.254.164.7:8100" />
<allow-navigation href="http://10.131.139.253:8101" />
<allow-navigation href="http://10.131.139.253:8100" />
<allow-navigation href="http://10.40.221.18:8101" />
<plugin name="cordova-android-support-gradle-release" spec="^3.0.1">
<variable name="ANDROID_SUPPORT_VERSION" value="27.+" />
</plugin>
<plugin name="cordova-plugin-android-permissions" spec="^1.0.0" />
<plugin name="cordova-plugin-camera" spec="^4.0.3" />
<plugin name="cordova-plugin-device" spec="^2.0.2" />
<plugin name="cordova-plugin-dialogs" spec="^2.0.1" />
<plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
<plugin name="cordova-plugin-vibration" spec="^3.1.0" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<plugin name="cordova-sqlite-storage" spec="^3.2.1" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<plugin name="cordova-plugin-local-notification" spec="^0.9.0-beta.3" />
<plugin name="cordova-plugin-app-version" spec="^0.1.9" />
<plugin name="cordova-plugin-globalization" spec="^1.11.0" />
<plugin name="phonegap-plugin-mobile-accessibility" spec="^1.0.5" />
<plugin name="cordova-media-with-compression" spec="^2.1.2" />
<plugin name="cordova-plugin-file" spec="^6.0.1" />
<plugin name="cordova-plugin-insomnia" spec="^4.3.0" />
<plugin name="cordova-plugin-firebase-with-upstream-messaging" spec="^2.1.0" />
<plugin name="phonegap-plugin-barcodescanner" spec="^8.1.0">
<variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
</plugin>
<plugin name="cordova-plugin-androidx" spec="^1.0.2" />
<plugin name="cordova-plugin-androidx-adapter" spec="^1.1.0" />
<plugin name="cordova-plugin-background-mode-fixes" spec="^0.7.4" />
<engine name="android" spec="^8.0.0" />
<widget android-versionCode="532" id="org.phidatalab.radar_armt" version="0.6.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>RADAR Questionnaire</name>
<description>An application that collects active data for research.</description>
<author email="[email protected]" href="http://radar-cns.org/">RADAR-CNS</author>
<content src="index.html" />
<access origin="*" />
<access origin="*" subdomains="true" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<icon src="resources/android/icon/drawable-xhdpi-icon.png" />
<preference name="DisallowOverscroll" value="true" />
<preference name="BackgroundColor" value="0xff6d9aa5" />
<preference name="Orientation" value="portrait" />
<platform name="android">
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" />
<allow-intent href="market:*" />
<preference name="android-minSdkVersion" value="21" />
<preference name="AndroidLaunchMode" value="singleTop" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenBackgroundColor" value="0xff6d9aa5" />
<preference name="FadeSplashScreen" value="true" />
<preference name="FadeSplashScreenDuration" value="1000" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="LoadUrlTimeoutValue" value="700000" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="SplashScreenSpinnerColor" value="0xffffffff" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<allow-navigation href="*" />
<allow-navigation href="http://10.40.189.168:8101" />
<allow-navigation href="http://10.40.189.168:8100" />
<allow-navigation href="http://10.40.177.195:8101" />
<allow-navigation href="http://10.40.177.195:8100" />
<allow-navigation href="http://10.40.140.19:8100" />
<allow-navigation href="http://172.20.10.5:8100" />
<allow-navigation href="http://10.41.163.140:8100" />
<allow-navigation href="http://10.40.230.126:8100" />
<allow-navigation href="http://10.40.149.14:8100" />
<allow-navigation href="http://10.40.149.14:8101" />
<allow-navigation href="http://172.20.10.5:8101" />
<allow-navigation href="http://10.236.23.88:8100" />
<allow-navigation href="http://172.20.20.20:8100" />
<allow-navigation href="http://10.0.0.150:8100" />
<allow-navigation href="http://10.35.12.253:8100" />
<allow-navigation href="http://10.35.12.253:8101" />
<allow-navigation href="http://169.254.164.7:8100" />
<allow-navigation href="http://10.131.139.253:8101" />
<allow-navigation href="http://10.131.139.253:8100" />
<allow-navigation href="http://10.40.221.18:8101" />
<plugin name="cordova-android-support-gradle-release" spec="^3.0.1">
<variable name="ANDROID_SUPPORT_VERSION" value="27.+" />
</plugin>
<plugin name="cordova-plugin-android-permissions" spec="^1.0.0" />
<plugin name="cordova-plugin-camera" spec="^4.0.3" />
<plugin name="cordova-plugin-device" spec="^2.0.2" />
<plugin name="cordova-plugin-dialogs" spec="^2.0.1" />
<plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
<plugin name="cordova-plugin-vibration" spec="^3.1.0" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<plugin name="cordova-sqlite-storage" spec="^3.2.1" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<plugin name="cordova-plugin-local-notification" spec="^0.9.0-beta.3" />
<plugin name="cordova-plugin-app-version" spec="^0.1.9" />
<plugin name="cordova-plugin-globalization" spec="^1.11.0" />
<plugin name="phonegap-plugin-mobile-accessibility" spec="^1.0.5" />
<plugin name="cordova-media-with-compression" spec="^2.1.2" />
<plugin name="cordova-plugin-file" spec="^6.0.1" />
<plugin name="cordova-plugin-insomnia" spec="^4.3.0" />
<plugin name="cordova-plugin-firebase-with-upstream-messaging" spec="^2.1.0" />
<plugin name="phonegap-plugin-barcodescanner" spec="^8.1.0">
<variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
</plugin>
<plugin name="cordova-plugin-androidx" spec="^1.0.2" />
<plugin name="cordova-plugin-androidx-adapter" spec="^1.1.0" />
<plugin name="cordova-plugin-background-mode-fixes" spec="^0.7.4" />
<engine name="android" spec="^8.0.0" />
</widget>
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ import {
Output
} from '@angular/core'
import { NavController, Platform } from 'ionic-angular'
import { Subscription } from 'rxjs'

import { DefaultMaxAudioAttemptsAllowed } from '../../../../../../assets/data/defaultConfig'
import { AlertService } from '../../../../../core/services/alert.service'
import { AndroidPermissionUtility } from '../../../../../shared/utilities/android-permission'
import { AudioRecordService } from '../../../services/audio-record.service'
import { DefaultMaxAudioAttemptsAllowed } from '../../../../../../assets/data/defaultConfig'
import { HomePageComponent } from '../../../../home/containers/home-page.component'
import { LocKeys } from '../../../../../shared/enums/localisations'
import { Section } from '../../../../../shared/models/question'
import { Subscription } from 'rxjs'
import { TranslatePipe } from '../../../../../shared/pipes/translate/translate'
import { AndroidPermissionUtility } from '../../../../../shared/utilities/android-permission'
import { HomePageComponent } from '../../../../home/containers/home-page.component'
import { AudioRecordService } from '../../../services/audio-record.service'

@Component({
selector: 'audio-input',
Expand Down Expand Up @@ -75,7 +75,7 @@ export class AudioInputComponent implements OnDestroy, OnInit {
this.stopRecording()
if (this.recordAttempts == DefaultMaxAudioAttemptsAllowed)
this.finishRecording().catch(e => this.showTaskInterruptedAlert())
this.showAfterAttemptAlert()
else this.showAfterAttemptAlert()
}
}

Expand Down
18 changes: 10 additions & 8 deletions src/app/pages/questions/containers/questions-page.component.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
// tslint:disable:no-eval
import { Component, ElementRef, ViewChild } from '@angular/core'
import { Insomnia } from '@ionic-native/insomnia/ngx'
import {
App,
Content,
NavController,
NavParams,
ViewController
} from 'ionic-angular'
// tslint:disable:no-eval
import { Component, ElementRef, ViewChild } from '@angular/core'
import { Question, QuestionType } from '../../../shared/models/question'

import { AnswerService } from '../services/answer.service'
import { FinishPageComponent } from '../../finish/containers/finish-page.component'
import { FirebaseAnalyticsService } from '../../../core/services/firebaseAnalytics.service'
import { Insomnia } from '@ionic-native/insomnia/ngx'
import { LocKeys } from '../../../shared/enums/localisations'
import { Question, QuestionType } from '../../../shared/models/question'
import { TimestampService } from '../services/timestamp.service'
import { TranslatePipe } from '../../../shared/pipes/translate/translate'
import { getSeconds } from '../../../shared/utilities/time'
import { FinishPageComponent } from '../../finish/containers/finish-page.component'
import { AnswerService } from '../services/answer.service'
import { TimestampService } from '../services/timestamp.service'

@Component({
selector: 'page-questions',
Expand Down Expand Up @@ -156,7 +156,9 @@ export class QuestionsPageComponent {
this.setNextDisabled()

if (
this.questions[this.currentQuestion].field_type === QuestionType.timed
this.questions[this.currentQuestion].field_type ===
QuestionType.timed ||
this.questions[this.currentQuestion].field_type === QuestionType.audio
)
this.setPreviousDisabled()
else this.setPreviousEnabled()
Expand Down

0 comments on commit 27925f5

Please sign in to comment.