Merge branch 'develop' into 'master'
Develop See merge request RiskAhead/RiskAhead-Android!1
This commit is contained in:
5
.idea/gradle.xml
generated
5
.idea/gradle.xml
generated
@@ -3,10 +3,9 @@
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="distributionType" value="LOCAL" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleHome" value="C:\Program Files\Android\Android Studio\gradle\gradle-2.14.1" />
|
||||
<option name="gradleJvm" value="1.7" />
|
||||
<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-4.1" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
|
||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -37,7 +37,7 @@
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
2
.idea/modules.xml
generated
2
.idea/modules.xml
generated
@@ -2,8 +2,8 @@
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/RiskAhead-Android.iml" filepath="$PROJECT_DIR$/RiskAhead-Android.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/riskAhead.iml" filepath="$PROJECT_DIR$/riskAhead.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.id="RiskAhead" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
|
||||
<module external.linked.project.id="RiskAhead-Android" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="java-gradle" name="Java-Gradle">
|
||||
<configuration>
|
||||
@@ -13,7 +13,7 @@
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="jdk" jdkName="JDK" jdkType="JavaSDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
Binary file not shown.
164
app/app.iml
164
app/app.iml
@@ -9,7 +9,6 @@
|
||||
<facet type="android" name="Android">
|
||||
<configuration>
|
||||
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
||||
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
|
||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
||||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
||||
<afterSyncTasks>
|
||||
@@ -23,33 +22,33 @@
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
|
||||
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/fabric/res/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/google-services/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/test/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
|
||||
@@ -57,15 +56,20 @@
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
||||
@@ -73,7 +77,6 @@
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
||||
@@ -81,84 +84,119 @@
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/build-info" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/23.1.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/multidex/1.0.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.1.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.beardedhen/androidbootstrap/2.0.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.facebook.android/facebook-android-sdk/4.8.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-ads/8.4.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-base/8.4.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-basement/8.4.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-gcm/8.4.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-location/8.4.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-maps/8.4.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-measurement/8.4.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-plus/8.4.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.maps.android/android-maps-utils/0.4/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/google-material-typeface/2.1.0.1.original/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/iconics-core/2.5.5/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/materialdrawer/4.6.4/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/materialize/0.5.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.twitter.sdk.android/twitter-core/1.4.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/io.fabric.sdk.android/fabric/1.3.4/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-resources" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaPrecompile" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged-not-compiled-resources" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/prebuild" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard-rules" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res_stripped" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/split-apk" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/splits-support" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="jdk" jdkName="Android API 27 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" exported="" name="iconics-core-2.5.5" level="project" />
|
||||
<orderEntry type="library" exported="" name="library-1.0.19" level="project" />
|
||||
<orderEntry type="library" exported="" name="play-services-location-8.4.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="play-services-plus-8.4.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="google-material-typeface-2.1.0.1.original" level="project" />
|
||||
<orderEntry type="library" exported="" name="retrofit-1.6.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="play-services-base-8.4.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="play-services-measurement-8.4.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="androidbootstrap-2.0.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="play-services-maps-8.4.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="recyclerview-v7-23.1.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-v4-23.1.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="android-maps-utils-0.4" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-23.1.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="bolts-android-1.2.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="appcompat-v7-23.1.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="materialdrawer-4.6.4" level="project" />
|
||||
<orderEntry type="library" exported="" name="play-services-ads-8.4.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="materialize-0.5.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="gson-2.4" level="project" />
|
||||
<orderEntry type="library" exported="" name="fabric-1.3.4" level="project" />
|
||||
<orderEntry type="library" exported="" name="play-services-gcm-8.4.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="design-23.1.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="multidex-1.0.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="twitter-core-1.4.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="facebook-android-sdk-4.8.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="play-services-basement-8.4.0" level="project" />
|
||||
<orderEntry type="library" name="com.android.support:appcompat-v7-27.1.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.code.gson:gson:2.8.0@jar" level="project" />
|
||||
<orderEntry type="library" name="com.android.support:design-27.1.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.firebase:firebase-iid-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-gcm-license-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.squareup.retrofit:retrofit:1.6.1@jar" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-base-license-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.android.support:transition-27.1.0" level="project" />
|
||||
<orderEntry type="library" name="com.mikepenz:iconics-core-3.0.3" level="project" />
|
||||
<orderEntry type="library" name="com.android.support:recyclerview-v7-27.1.0" level="project" />
|
||||
<orderEntry type="library" name="com.parse.bolts:bolts-tasks:1.4.0@jar" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-basement-license-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.facebook.android:facebook-core-4.31.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-iid-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.facebook.android:facebook-common-4.31.0" level="project" />
|
||||
<orderEntry type="library" name="com.mikepenz:materialize-1.1.2" level="project" />
|
||||
<orderEntry type="library" name="com.mikepenz:fastadapter-extensions-expandable-3.2.4" level="project" />
|
||||
<orderEntry type="library" name="com.mikepenz:google-material-typeface-3.0.1.2.original" level="project" />
|
||||
<orderEntry type="library" name="com.android.support:customtabs-27.0.2" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-plus-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-iid-license-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.android.support:cardview-v7-27.0.2" level="project" />
|
||||
<orderEntry type="library" name="com.twitter.sdk.android:twitter-core-1.4.1" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-ads-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-basement-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.firebase:firebase-common-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="android.arch.lifecycle:viewmodel-1.1.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-tasks-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="io.fabric.sdk.android:fabric-1.3.4" level="project" />
|
||||
<orderEntry type="library" name="com.google.firebase:firebase-common-license-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.firebase:firebase-core-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-ads-lite-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.facebook.android:facebook-messenger-4.31.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-location-license-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.zxing:core:3.3.0@jar" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-ads-lite-license-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.facebook.android:facebook-share-4.31.0" level="project" />
|
||||
<orderEntry type="library" name="com.mikepenz:fastadapter-3.2.4" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-base-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.firebase:firebase-analytics-impl-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.mikepenz:materialdrawer-6.0.6" level="project" />
|
||||
<orderEntry type="library" name="com.android.support:animated-vector-drawable-27.1.0" level="project" />
|
||||
<orderEntry type="library" name="com.facebook.android:facebook-applinks-4.31.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-plus-license-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.firebase:firebase-iid-license-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.mcxiaoke.volley:library:1.0.19@jar" level="project" />
|
||||
<orderEntry type="library" name="com.android.support:support-core-utils-27.1.0" level="project" />
|
||||
<orderEntry type="library" name="android.arch.core:common:1.1.0@jar" level="project" />
|
||||
<orderEntry type="library" name="com.android.support:support-annotations:27.1.0@jar" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-gass-license-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.parse.bolts:bolts-applinks:1.4.0@jar" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-maps-license-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.firebase:firebase-analytics-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.beardedhen:androidbootstrap-2.3.2" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-ads-license-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.facebook.android:facebook-android-sdk-4.31.0" level="project" />
|
||||
<orderEntry type="library" name="com.facebook.android:facebook-places-4.31.0" level="project" />
|
||||
<orderEntry type="library" name="android.arch.lifecycle:runtime-1.1.0" level="project" />
|
||||
<orderEntry type="library" name="com.android.support:support-vector-drawable-27.1.0" level="project" />
|
||||
<orderEntry type="library" name="com.facebook.android:facebook-login-4.31.0" level="project" />
|
||||
<orderEntry type="library" name="android.arch.lifecycle:common:1.1.0@jar" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-maps-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.parse.bolts:bolts-android:1.4.0@jar" level="project" />
|
||||
<orderEntry type="library" name="com.android.support:support-compat-27.1.0" level="project" />
|
||||
<orderEntry type="library" name="com.android.support:support-core-ui-27.1.0" level="project" />
|
||||
<orderEntry type="library" name="android.arch.lifecycle:livedata-core-1.1.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-location-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.android.support:support-media-compat-27.1.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-gass-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.android.support:support-fragment-27.1.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-gcm-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.maps.android:android-maps-utils-0.5" level="project" />
|
||||
<orderEntry type="library" name="com.google.firebase:firebase-analytics-license-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="com.android.support:support-v4-27.1.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.firebase:firebase-analytics-impl-license-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="android.arch.core:runtime-1.1.0" level="project" />
|
||||
<orderEntry type="library" name="com.google.android.gms:play-services-tasks-license-11.8.0" level="project" />
|
||||
<orderEntry type="library" name="android-android-27" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -1,26 +1,16 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'io.fabric.tools:gradle:1.+'
|
||||
}
|
||||
}
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'io.fabric'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "23.0.2"
|
||||
compileSdkVersion 27
|
||||
buildToolsVersion '27.0.3'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.deke.risk.riskahead"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 23
|
||||
versionCode 35
|
||||
versionName "2.1.1"
|
||||
targetSdkVersion 25
|
||||
versionCode 43
|
||||
versionName "3.1"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
@@ -29,6 +19,9 @@ android {
|
||||
debuggable false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
debuggable true
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
@@ -38,28 +31,37 @@ android {
|
||||
repositories {
|
||||
jcenter()
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
maven { url 'https://maven.google.com/' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: 'Parse-*.jar')
|
||||
implementation 'com.facebook.android:facebook-android-sdk:4.31.0'
|
||||
compile('com.twitter.sdk.android:twitter-core:1.4.1@aar') {
|
||||
transitive = true;
|
||||
}
|
||||
compile('com.mikepenz:materialdrawer:4.6.4@aar') {
|
||||
transitive = true
|
||||
}
|
||||
compile 'com.android.support:appcompat-v7:23.1.1'
|
||||
compile 'com.mikepenz:iconics-core:2.5.5@aar'
|
||||
compile 'com.mikepenz:google-material-typeface:2.1.0.1.original@aar'
|
||||
compile 'com.google.android.gms:play-services-gcm:8.4.0'
|
||||
compile 'com.google.android.gms:play-services-plus:8.4.0'
|
||||
compile 'com.google.android.gms:play-services-location:8.4.0'
|
||||
compile 'com.google.android.gms:play-services-ads:8.4.0'
|
||||
compile 'com.facebook.android:facebook-android-sdk:4.8.1'
|
||||
compile 'com.beardedhen:androidbootstrap:2.0.1'
|
||||
|
||||
implementation 'com.mikepenz:iconics-core:3.0.3@aar'
|
||||
implementation 'com.mikepenz:iconics-core:3.0.3@aar'
|
||||
implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original@aar'
|
||||
compile('com.mikepenz:materialdrawer:6.0.6@aar') {
|
||||
transitive = true
|
||||
}
|
||||
|
||||
compile 'com.android.support:appcompat-v7:27.1.0'
|
||||
compile 'com.android.support:support-v4:27.1.0'
|
||||
compile 'com.android.support:design:27.1.0'
|
||||
|
||||
compile 'com.google.android.gms:play-services-gcm:11.8.0'
|
||||
compile 'com.google.android.gms:play-services-plus:11.8.0'
|
||||
compile 'com.google.android.gms:play-services-location:11.8.0'
|
||||
compile 'com.google.android.gms:play-services-ads:11.8.0'
|
||||
compile 'com.google.android.gms:play-services-maps:11.8.0'
|
||||
|
||||
compile 'com.google.maps.android:android-maps-utils:0.5'
|
||||
compile 'com.google.code.gson:gson:2.8.0'
|
||||
compile 'com.beardedhen:androidbootstrap:2.3.2'
|
||||
compile 'com.mcxiaoke.volley:library:1.0.19'
|
||||
compile 'com.android.support:design:23.1.1'
|
||||
compile 'com.google.code.gson:gson:2.4'
|
||||
compile 'com.google.maps.android:android-maps-utils:0.4'
|
||||
compile 'com.android.support:support-v4:23.1.1'
|
||||
}
|
||||
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
@@ -1 +1,70 @@
|
||||
{"project_info":{"project_id":"riskahead-61dff","project_number":"498007911848","name":"RiskAhead"},"client":[{"client_info":{"client_id":"android:org.deke.risk.riskahead","client_type":1,"android_client_info":{"package_name":"org.deke.risk.riskahead"}},"oauth_client":[{"client_id":"498007911848-ppr7ct4oa2gs5jjnmrnlnutgui8m365n.apps.googleusercontent.com","client_type":1,"android_info":{"package_name":"org.deke.risk.riskahead","certificate_hash":"4b6c989e6c0d6824f5a2d7b1a10ff36560c3397f"}}],"services":{"analytics_service":{"status":1},"cloud_messaging_service":{"status":1,"apns_config":[]},"appinvite_service":{"status":1,"other_platform_oauth_client":[]},"google_signin_service":{"status":2},"ads_service":{"status":1}}}]}
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "498007911848",
|
||||
"firebase_url": "https://riskahead-61dff.firebaseio.com",
|
||||
"project_id": "riskahead-61dff"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:498007911848:android:89cfbce52ef79add",
|
||||
"android_client_info": {
|
||||
"package_name": "org.deke.risk.riskahead"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "498007911848-bbfoj739tjtlr22faobmg8e4fls6c5ue.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
},
|
||||
{
|
||||
"client_id": "498007911848-rs2ghjusnngqcb487os1s6nt4i8an8d5.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "org.deke.risk.riskahead",
|
||||
"certificate_hash": "742d036d112c9a727a8c8aec1718eb1ba1e05a91"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "498007911848-belfueqha30j41gmjqe77db3qdrutcoc.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "org.deke.risk.riskahead",
|
||||
"certificate_hash": "e4559e601888977e334d387d9e30dadedb855cbc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "498007911848-ppr7ct4oa2gs5jjnmrnlnutgui8m365n.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "org.deke.risk.riskahead",
|
||||
"certificate_hash": "4b6c989e6c0d6824f5a2d7b1a10ff36560c3397f"
|
||||
}
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAV9_hgRs5tuDN4Okp0ydLboORO-cJgJtA"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"analytics_service": {
|
||||
"status": 1
|
||||
},
|
||||
"appinvite_service": {
|
||||
"status": 2,
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "498007911848-bbfoj739tjtlr22faobmg8e4fls6c5ue.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
"ads_service": {
|
||||
"status": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
BIN
app/release/app-release.apk
Normal file
BIN
app/release/app-release.apk
Normal file
Binary file not shown.
1
app/release/output.json
Normal file
1
app/release/output.json
Normal file
@@ -0,0 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":43},"path":"app-release.apk","properties":{"packageId":"org.deke.risk.riskahead","split":"","minSdkVersion":"15"}}]
|
||||
@@ -5,13 +5,11 @@
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<!-- <uses-permission android:name="android.permission.USE_CREDENTIALS" /> -->
|
||||
<!-- <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />-->
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="org.deke.risk.riskahead.permission.MAPS_RECEIVE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
<uses-permission android:name="org.deke.risk.riskahead.permission.MAPS_RECEIVE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
|
||||
<!-- Google Maps Android API V2 requires OpenGL ES version 2 -->
|
||||
<uses-feature
|
||||
@@ -49,39 +47,28 @@
|
||||
android:name="com.google.android.gms.ads.AdActivity"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
|
||||
android:theme="@android:style/Theme.Translucent" />
|
||||
<activity
|
||||
android:name=".StartActivity"
|
||||
android:label="@string/title_activity_start"
|
||||
android:screenOrientation="portrait">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".LoginActivity"
|
||||
android:label="@string/app_name"
|
||||
android:parentActivityName=".StartActivity"
|
||||
android:screenOrientation="portrait">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".StartActivity" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.twitter.sdk.android.core.identity.OAuthActivity" />
|
||||
<activity
|
||||
android:name="com.facebook.FacebookActivity"
|
||||
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/title_activity_entrance"
|
||||
android:screenOrientation="portrait" />
|
||||
android:label="@string/app_name" />
|
||||
<!-- android:theme="@android:style/Theme.Translucent.NoTitleBar" -->
|
||||
<activity
|
||||
android:name=".MapsActivity"
|
||||
android:label="@string/title_activity_maps"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="portrait">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEARCH" />
|
||||
</intent-filter>
|
||||
@@ -134,6 +121,6 @@
|
||||
</category>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.content.pm.PackageManager;
|
||||
import android.content.res.Resources;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.support.design.widget.TextInputLayout;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.content.Intent;
|
||||
@@ -21,7 +22,6 @@ import android.util.Patterns;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.LinearLayout;
|
||||
@@ -43,6 +43,7 @@ import com.android.volley.Request.Method;
|
||||
import com.android.volley.Response;
|
||||
import com.android.volley.VolleyError;
|
||||
import com.android.volley.toolbox.StringRequest;
|
||||
import com.beardedhen.androidbootstrap.BootstrapButton;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -62,6 +63,9 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
private TextView input_username;
|
||||
private TextView input_password;
|
||||
|
||||
private TextInputLayout inputLayoutEmail;
|
||||
private TextInputLayout inputLayoutPassword;
|
||||
|
||||
private ProgressDialog pDialog;
|
||||
private SessionManager session;
|
||||
|
||||
@@ -84,6 +88,14 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
isNetworkAvailable();
|
||||
checkForMaintenance();
|
||||
|
||||
SessionManager session = new SessionManager(getApplicationContext());
|
||||
if (session.isLoggedIn()) {
|
||||
Log.d(TAG,"User found in sharedPrefs and is therefore logged in. Continue to internal Area.");
|
||||
Intent intent = new Intent(LoginActivity.this, MapsActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void isNetworkAvailable() {
|
||||
@@ -96,7 +108,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
.setCancelable(false)
|
||||
.setNeutralButton(android.R.string.yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
gotoStartActivity();
|
||||
//todo What to do when no internet connection is available?
|
||||
}
|
||||
})
|
||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||
@@ -108,9 +120,9 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
Intent intent = getIntent();
|
||||
String msg_intent = intent.getStringExtra(AppConfig.EXTRA_MESSAGE);
|
||||
|
||||
if(msg_intent.equals(AppConfig.INTENT_LOGIN)){
|
||||
if(msg_intent != null && msg_intent.equals(AppConfig.INTENT_LOGIN)){
|
||||
initLoginView();
|
||||
}else if(msg_intent.equals(AppConfig.INTENT_REGISTER)){
|
||||
}else if((msg_intent == null) || msg_intent.equals(AppConfig.INTENT_REGISTER)){
|
||||
initRegisterView();
|
||||
}
|
||||
}
|
||||
@@ -125,10 +137,22 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
setContentView(R.layout.activity_login);
|
||||
|
||||
input_email = (TextView) findViewById(R.id.input_register_email);
|
||||
inputLayoutEmail = (TextInputLayout) findViewById(R.id.input_layout_email);
|
||||
|
||||
input_password = (TextView) findViewById(R.id.input_register_password);
|
||||
inputLayoutPassword = (TextInputLayout) findViewById(R.id.input_layout_password);
|
||||
|
||||
TextView btn_requestPW = (TextView) findViewById(R.id.lbl_login_resendPW);
|
||||
|
||||
Button btn_login = (Button) findViewById(R.id.btn_login);
|
||||
BootstrapButton btn_gotoregistration = (BootstrapButton) findViewById(R.id.btn_switchtoregistration);
|
||||
btn_gotoregistration.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
gotoRegister(v);
|
||||
}
|
||||
});
|
||||
|
||||
BootstrapButton btn_login = (BootstrapButton) findViewById(R.id.btn_login);
|
||||
btn_login.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -136,7 +160,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
String email = input_email.getText().toString();
|
||||
String password = input_password.getText().toString();
|
||||
|
||||
if (input_password.getError() != null || input_email.getError() != null) {
|
||||
if (inputLayoutPassword.getError() != null || inputLayoutEmail.getError() != null) {
|
||||
showMessage(getString(R.string.error_validation));
|
||||
} else {
|
||||
showDialog();
|
||||
@@ -145,20 +169,24 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
}
|
||||
});
|
||||
|
||||
input_email.addTextChangedListener(new TextValidator(input_email, getApplicationContext()) {
|
||||
input_email.addTextChangedListener(new TextValidator(input_email, inputLayoutEmail, getApplicationContext()) {
|
||||
@Override
|
||||
public void validate(TextView textView, String text) {
|
||||
public void validate(TextView textView, TextInputLayout inputLayout, String text) {
|
||||
if (!Patterns.EMAIL_ADDRESS.matcher(text).matches()) {
|
||||
textView.setError(getString(R.string.error_email));
|
||||
inputLayout.setError(getString(R.string.error_email));
|
||||
} else {
|
||||
inputLayout.setErrorEnabled(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
input_password.addTextChangedListener(new TextValidator(input_password, getApplicationContext()) {
|
||||
input_password.addTextChangedListener(new TextValidator(input_password, inputLayoutPassword,getApplicationContext()) {
|
||||
@Override
|
||||
public void validate(TextView textView, String text) {
|
||||
public void validate(TextView textView, TextInputLayout inputLayout,String text) {
|
||||
if (text.length() < 5) {
|
||||
textView.setError(getString(R.string.error_password));
|
||||
inputLayout.setError(getString(R.string.error_password));
|
||||
} else {
|
||||
inputLayout.setErrorEnabled(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -175,39 +203,43 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
setContentView(R.layout.activity_register);
|
||||
|
||||
input_username = (TextView) findViewById(R.id.input_register_name);
|
||||
final TextInputLayout inputLayoutUsername = (TextInputLayout) findViewById(R.id.input_layout_username);
|
||||
input_email = (TextView) findViewById(R.id.input_register_email);
|
||||
final TextInputLayout inputLayoutEmail = (TextInputLayout) findViewById(R.id.input_layout_email);
|
||||
input_password = (TextView) findViewById(R.id.input_register_password);
|
||||
Button btn_login = (Button) findViewById(R.id.btn_register);
|
||||
final TextInputLayout inputLayoutPassword = (TextInputLayout) findViewById(R.id.input_layout_password);
|
||||
BootstrapButton btn_login = (BootstrapButton) findViewById(R.id.btn_register);
|
||||
TextView btn_switchtologin = (TextView) findViewById(R.id.lbl_register_switchtologin);
|
||||
|
||||
input_username.addTextChangedListener(new TextValidator(input_username, getApplicationContext()) {
|
||||
input_username.addTextChangedListener(new TextValidator(input_username, inputLayoutUsername, getApplicationContext()) {
|
||||
@Override
|
||||
public void validate(TextView textView, String text) {
|
||||
public void validate(TextView textView, TextInputLayout inputLayout, String text) {
|
||||
if (text.trim().length() < 5) {
|
||||
textView.setError(getString(R.string.error_anytext));
|
||||
inputLayout.setError(getString(R.string.error_anytext));
|
||||
} else {
|
||||
textView.setError(null);
|
||||
inputLayout.setErrorEnabled(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
input_email.addTextChangedListener(new TextValidator(input_email, getApplicationContext()) {
|
||||
input_email.addTextChangedListener(new TextValidator(input_email, inputLayoutEmail, getApplicationContext()) {
|
||||
@Override
|
||||
public void validate(TextView textView, String text) {
|
||||
public void validate(TextView textView, TextInputLayout inputLayout, String text) {
|
||||
if (!Patterns.EMAIL_ADDRESS.matcher(text).matches()) {
|
||||
textView.setError(getString(R.string.error_email));
|
||||
inputLayout.setError(getString(R.string.error_email));
|
||||
}else{
|
||||
textView.setError(null);
|
||||
inputLayout.setErrorEnabled(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
input_password.addTextChangedListener(new TextValidator(input_password, getApplicationContext()) {
|
||||
input_password.addTextChangedListener(new TextValidator(input_password, inputLayoutPassword, getApplicationContext()) {
|
||||
@Override
|
||||
public void validate(TextView textView, String text) {
|
||||
public void validate(TextView textView, TextInputLayout inputLayout, String text) {
|
||||
if (text.length() < 5) {
|
||||
textView.setError(getString(R.string.error_password));
|
||||
inputLayout.setError(getString(R.string.error_password));
|
||||
} else {
|
||||
textView.setError(null);
|
||||
inputLayout.setErrorEnabled(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -219,7 +251,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
String password = input_password.getText().toString();
|
||||
|
||||
String name = input_username.getText().toString();
|
||||
if (input_password.getError() != null || input_email.getError() != null || input_username.getError() != null || input_email.getText().toString().trim().length() == 0 || input_username.getText().toString().trim().length() == 0 || input_password.getText().toString().trim().length() == 0) {
|
||||
if (inputLayoutPassword.getError() != null || inputLayoutEmail.getError() != null || inputLayoutUsername.getError() != null || input_email.getText().toString().trim().length() == 0 || input_username.getText().toString().trim().length() == 0 || input_password.getText().toString().trim().length() == 0) {
|
||||
showMessage(getString(R.string.error_validation));
|
||||
} else {
|
||||
showDialog();
|
||||
@@ -227,11 +259,17 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
btn_switchtologin.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
gotoLogin(v);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initSocialLoginButtons() {
|
||||
FragmentManager fragmentManager = getSupportFragmentManager();
|
||||
//FacebookButtonFragment fragmentFB = new FacebookButtonFragment();
|
||||
new FacebookButtonFragment();
|
||||
GooglePlusButtonFragment fragmentGP = new GooglePlusButtonFragment();
|
||||
|
||||
@@ -247,11 +285,11 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestCheckForMaintenance() {
|
||||
return new StringRequest(Method.POST, AppConfig.URL_ENCRYPTED, new Response.Listener<String>() {
|
||||
return new StringRequest(Method.POST, AppConfig.REST_CHECK_MAINTENANCE, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
Log.d(TAG, "Check User Exists Response: " + response);
|
||||
Log.d(TAG, "Check for Maintenance Response: " + response);
|
||||
hideDialog();
|
||||
|
||||
try {
|
||||
@@ -261,7 +299,6 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
if (!error) {
|
||||
if(jObj.getBoolean("maintenancemode")){
|
||||
showMessage(jObj.getString("maintenancemsg"));
|
||||
gotoStartActivity();
|
||||
}
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
@@ -277,18 +314,20 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_CHECK_MAINTENANCE);
|
||||
|
||||
return params;
|
||||
return new HashMap<>();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private void gotoStartActivity() {
|
||||
Intent intent = new Intent(
|
||||
LoginActivity.this,
|
||||
StartActivity.class);
|
||||
public void gotoLogin(View view) {
|
||||
Intent intent = new Intent(this, LoginActivity.class);
|
||||
intent.putExtra(AppConfig.EXTRA_MESSAGE, AppConfig.INTENT_LOGIN);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void gotoRegister(View view) {
|
||||
Intent intent = new Intent(this, LoginActivity.class);
|
||||
intent.putExtra(AppConfig.EXTRA_MESSAGE, AppConfig.INTENT_REGISTER);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@@ -299,11 +338,11 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestCheckIfVersionSupported() {
|
||||
return new StringRequest(Method.POST, AppConfig.URL_ENCRYPTED, new Response.Listener<String>() {
|
||||
return new StringRequest(Method.POST, AppConfig.REST_CHECK_VERSION, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
Log.d(TAG, "Check User Exists Response: " + response);
|
||||
Log.d(TAG, "Check Version Response: " + response);
|
||||
hideDialog();
|
||||
|
||||
try {
|
||||
@@ -339,7 +378,6 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
params.put("tag", AppConfig.REST_CHECK_VERSION);
|
||||
params.put("version", Integer.toString(versionCode));
|
||||
return params;
|
||||
}
|
||||
@@ -409,7 +447,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
if(session.isLoggedIn()){
|
||||
Intent intent = new Intent(
|
||||
LoginActivity.this,
|
||||
MainActivity.class);
|
||||
MapsActivity.class);
|
||||
intent.putExtra(AppConfig.EXTRA_MESSAGE, AppConfig.INTENT_SOCIALMEDIALOGIN);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
@@ -424,7 +462,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
}
|
||||
|
||||
public void onRequestNewPasswordClick(View view){
|
||||
if((input_email.getText() != null && input_email.getText().toString().isEmpty()) || (input_email.getError() != null)){
|
||||
if((input_email.getText() != null && input_email.getText().toString().isEmpty()) || (inputLayoutEmail.getError() != null)){
|
||||
showMessage(getString(R.string.message_enteremail));
|
||||
return;
|
||||
}
|
||||
@@ -459,7 +497,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestSocialMediaLogin(final String key, final String providerType, final String username, final String email) {
|
||||
return new StringRequest(Method.POST,AppConfig.URL_ENCRYPTED, new Response.Listener<String>() {
|
||||
return new StringRequest(Method.POST,AppConfig.REST_LOGIN_SOCIAL, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -505,7 +543,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
|
||||
Intent intent = new Intent(
|
||||
LoginActivity.this,
|
||||
MainActivity.class);
|
||||
MapsActivity.class);
|
||||
intent.putExtra(AppConfig.EXTRA_MESSAGE, AppConfig.INTENT_SOCIALMEDIALOGIN);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
@@ -532,9 +570,8 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_LOGIN_SOCIAL);
|
||||
params.put("key", key);
|
||||
params.put("providerType", providerType);
|
||||
params.put("providertype", providerType);
|
||||
params.put("username", username);
|
||||
params.put("email",email);
|
||||
|
||||
@@ -545,7 +582,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestLogin(final String email, final String password) {
|
||||
return new StringRequest(Method.POST, AppConfig.URL_ENCRYPTED, new Response.Listener<String>() {
|
||||
return new StringRequest(Method.POST, AppConfig.REST_LOGIN, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -612,7 +649,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
|
||||
hideDialog();
|
||||
|
||||
Intent intent = new Intent(LoginActivity.this, MainActivity.class);
|
||||
Intent intent = new Intent(LoginActivity.this, MapsActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
@@ -638,7 +675,6 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_LOGIN);
|
||||
params.put("email", email);
|
||||
params.put("password", password);
|
||||
|
||||
@@ -648,7 +684,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestCheckUserExists(final String username, final String email, final String password) {
|
||||
return new StringRequest(Method.POST, AppConfig.URL_ENCRYPTED, new Response.Listener<String>() {
|
||||
return new StringRequest(Method.POST, AppConfig.REST_USEREXISTS, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -691,7 +727,6 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_LOGIN_EXISTS);
|
||||
params.put("email", email);
|
||||
|
||||
return params;
|
||||
@@ -700,11 +735,11 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestCheckSocialUserExists(final String key, final String providerType, final String username, final String email) {
|
||||
return new StringRequest(Method.POST, AppConfig.URL_ENCRYPTED, new Response.Listener<String>() {
|
||||
return new StringRequest(Method.POST, AppConfig.REST_USEREXISTS, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
Log.d(TAG, "Check User Exists Response: " + response);
|
||||
Log.d(TAG, "Check Social User Exists Response: " + response);
|
||||
hideDialog();
|
||||
|
||||
try {
|
||||
@@ -718,8 +753,6 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
createAndShowPrivacyDialogForSocialUser( key,providerType, username, email);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
String errorMsg = jObj.getString("error_msg");
|
||||
Log.e(TAG, "Error occured: "+errorMsg);
|
||||
@@ -743,7 +776,6 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_LOGIN_EXISTS);
|
||||
params.put("key", key);
|
||||
|
||||
return params;
|
||||
@@ -873,7 +905,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestResetPW(final String email) {
|
||||
return new StringRequest(Method.POST, AppConfig.URL_ENCRYPTED, new Response.Listener<String>() {
|
||||
return new StringRequest(Method.POST, AppConfig.REST_REQUESTPWRESET, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -910,7 +942,6 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_REQUESTPWRESET);
|
||||
params.put("email", email);
|
||||
|
||||
return params;
|
||||
@@ -919,7 +950,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestActivationLinkUser(final String email) {
|
||||
return new StringRequest(Method.POST, AppConfig.URL_ENCRYPTED, new Response.Listener<String>() {
|
||||
return new StringRequest(Method.POST, AppConfig.REST_SENDACTIVATIONMAIL, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -933,7 +964,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
String errorMsg = jObj.getString("error_msg");
|
||||
Log.e(TAG,"Resend E-Mail returned error value: "+errorMsg);
|
||||
Toast.makeText(getApplicationContext(),
|
||||
getResources().getString(R.string.txt_errormsg_getactivationlink), Toast.LENGTH_LONG).show();
|
||||
getResources().getString(R.string.txt_errormsg_getactivationlink) + ":"+errorMsg, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
@@ -944,7 +975,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
|
||||
@Override
|
||||
public void onErrorResponse(VolleyError error) {
|
||||
Log.e(TAG, "E-Mail pw resend Error: " + error.getMessage());
|
||||
Log.e(TAG, "E-Mail pw resend error: " + error.getMessage());
|
||||
Toast.makeText(getApplicationContext(),
|
||||
getResources().getString(R.string.txt_errormsg_getactivationlink), Toast.LENGTH_LONG).show();
|
||||
hideDialog();
|
||||
@@ -954,7 +985,6 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_RESENDACTIVATIONMAIL);
|
||||
params.put("email", email);
|
||||
|
||||
return params;
|
||||
@@ -963,7 +993,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestRegisterUser(final String username, final String email, final String password) {
|
||||
return new StringRequest(Method.POST, AppConfig.URL_ENCRYPTED, new Response.Listener<String>() {
|
||||
return new StringRequest(Method.POST, AppConfig.REST_REGISTER, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -1012,7 +1042,6 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_REGISTER);
|
||||
params.put("username", username);
|
||||
params.put("email", email);
|
||||
params.put("password", password);
|
||||
@@ -1040,12 +1069,6 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
pDialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
gotoStartActivity();
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.menu_common, menu);
|
||||
@@ -1092,4 +1115,5 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,218 +0,0 @@
|
||||
package org.deke.risk.riskahead;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.volley.Request;
|
||||
import com.android.volley.Response;
|
||||
import com.android.volley.VolleyError;
|
||||
import com.android.volley.toolbox.StringRequest;
|
||||
import com.mikepenz.google_material_typeface_library.GoogleMaterial;
|
||||
import com.mikepenz.iconics.IconicsDrawable;
|
||||
|
||||
import org.deke.risk.riskahead.helper.AppConfig;
|
||||
import org.deke.risk.riskahead.helper.AppController;
|
||||
import org.deke.risk.riskahead.helper.BaseActivity;
|
||||
import org.deke.risk.riskahead.helper.SessionManager;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* (C) Copyright 2016 RiskAhead (http://www.riskahead.net)
|
||||
* Developer & Contributor: Dennis Thießen (dennis.thiessen@riskahead.net)
|
||||
* Date of Release: 10.02.2016
|
||||
*
|
||||
*/
|
||||
public class MainActivity extends BaseActivity{
|
||||
|
||||
private final static String TAG = MainActivity.class.getSimpleName();
|
||||
|
||||
private Handler mHandler = new Handler();
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
userHasToBeLoggedIn();
|
||||
showDialog();
|
||||
|
||||
initButtons();
|
||||
}
|
||||
|
||||
private void initButtons() {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ImageView bg = (ImageView) findViewById(R.id.imageView);
|
||||
bg.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), R.drawable.bg_withlogo_2));
|
||||
|
||||
|
||||
Button report = (Button) findViewById(R.id.btn_main_report);
|
||||
report.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
gotoReportActivity();
|
||||
}
|
||||
});
|
||||
|
||||
Drawable reportIcon = new IconicsDrawable(getApplicationContext())
|
||||
.icon(GoogleMaterial.Icon.gmd_room)
|
||||
.color(ContextCompat.getColor(getApplicationContext(), R.color.white))
|
||||
.sizeDp(24);
|
||||
|
||||
report.setCompoundDrawables(reportIcon, null, null, null);
|
||||
report.setBackgroundResource(R.drawable.activity_main_button);
|
||||
|
||||
Button map = (Button) findViewById(R.id.btn_main_viewmap);
|
||||
|
||||
map.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
gotoMapActivity();
|
||||
}
|
||||
});
|
||||
|
||||
Drawable mapIcon = new IconicsDrawable(getApplicationContext())
|
||||
.icon(GoogleMaterial.Icon.gmd_map)
|
||||
.color(ContextCompat.getColor(getApplicationContext(), R.color.white))
|
||||
.sizeDp(24);
|
||||
|
||||
map.setCompoundDrawables(null, null, mapIcon, null);
|
||||
map.setBackgroundResource(R.drawable.activity_main_button);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Runnable mHandlerTask = new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run() {
|
||||
requestNumberOfIncidents();
|
||||
|
||||
TextView notificationStatus = (TextView) findViewById(R.id.lbl_main_notifystatus_status);
|
||||
if(session.getNotificationEnabled()){
|
||||
if(session.getNotificationServiceReady()){
|
||||
notificationStatus.setText(getString(R.string.txt_notifystatus_activated));
|
||||
|
||||
notificationStatus.setTextColor(ContextCompat.getColor(getApplicationContext(),R.color.md_green_400));
|
||||
}else{
|
||||
notificationStatus.setText(getString(R.string.txt_notifystatus_activatedbutnotready));
|
||||
notificationStatus.setTextColor(ContextCompat.getColor(getApplicationContext(),R.color.md_yellow_400));
|
||||
}
|
||||
}else{
|
||||
notificationStatus.setText(getString(R.string.txt_notifystatus_deactivated));
|
||||
notificationStatus.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.md_red_400));
|
||||
}
|
||||
|
||||
mHandler.postDelayed(mHandlerTask, AppConfig.UPDATE_COUNT_INTERVAL);
|
||||
}
|
||||
};
|
||||
|
||||
private void requestNumberOfIncidents() {
|
||||
StringRequest strReq = getStringRequestIncidentCount();
|
||||
String tag_string_req = "req_incidents";
|
||||
AppController.getInstance().addToRequestQueue(strReq, tag_string_req);
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestIncidentCount() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
hideDialog();
|
||||
Log.d(TAG, "Incident count: " + response);
|
||||
|
||||
try {
|
||||
JSONObject jObj = new JSONObject(response);
|
||||
boolean error = jObj.getBoolean("error");
|
||||
|
||||
if (!error) {
|
||||
JSONObject jCount = jObj.getJSONObject("msg");
|
||||
|
||||
displayNumberOfIncidents(jCount);
|
||||
} else {
|
||||
String errorMsg = jObj.getString("error_msg");
|
||||
Log.e(TAG, "Error getting incident count (server returned error): " + errorMsg);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
|
||||
@Override
|
||||
public void onErrorResponse(VolleyError error) {
|
||||
Log.e(TAG, "Error getting incident count: " + error.getMessage());
|
||||
handleVolleyErrorResponse();
|
||||
stopRepeatingTask();
|
||||
hideDialog();
|
||||
}
|
||||
}) {
|
||||
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_GET_NUMOFINCIDENTS);
|
||||
params.put("uid", user.get(SessionManager.KEY_UID));
|
||||
params.put("token", user.get(SessionManager.TOKEN));
|
||||
return params;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private void displayNumberOfIncidents(JSONObject jCount) throws JSONException {
|
||||
TextView count = (TextView) findViewById(R.id.txt_main_incidents);
|
||||
DecimalFormat nf = new DecimalFormat();
|
||||
String decimalNumber = nf.format(jCount.getInt("total"));
|
||||
count.setText(decimalNumber);
|
||||
}
|
||||
|
||||
void startRepeatingTask()
|
||||
{
|
||||
mHandlerTask.run();
|
||||
}
|
||||
|
||||
void stopRepeatingTask()
|
||||
{
|
||||
mHandler.removeCallbacks(mHandlerTask);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume(){
|
||||
super.onResume();
|
||||
navDrawer.setSelection(mainAvtivityID, false);
|
||||
startRepeatingTask();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause(){
|
||||
super.onPause();
|
||||
stopRepeatingTask();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutResourceId() {
|
||||
return R.layout.activity_main;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getActivityName() {
|
||||
return getResources().getString(R.string.title_activity_start);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -9,6 +9,8 @@ import android.content.res.ColorStateList;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.location.Location;
|
||||
import android.location.LocationManager;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
@@ -23,11 +25,15 @@ import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RatingBar;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.volley.Request;
|
||||
import com.android.volley.Response;
|
||||
import com.android.volley.VolleyError;
|
||||
|
||||
import android.location.LocationListener;
|
||||
|
||||
import com.android.volley.toolbox.StringRequest;
|
||||
import com.google.android.gms.maps.CameraUpdate;
|
||||
import com.google.android.gms.maps.CameraUpdateFactory;
|
||||
@@ -65,11 +71,9 @@ import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* (C) Copyright 2016 RiskAhead (http://www.riskahead.net)
|
||||
* Developer & Contributor: Dennis Thießen (dennis.thiessen@riskahead.net)
|
||||
* Date of Release: 10.02.2016
|
||||
*
|
||||
*/
|
||||
public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCallbacks<Cursor>,
|
||||
ClusterManager.OnClusterItemInfoWindowClickListener<IncidentReport>, ClusterManager.OnClusterClickListener<IncidentReport>, ClusterManager.OnClusterItemClickListener<IncidentReport>, OnMapReadyCallback {
|
||||
@@ -96,6 +100,13 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
private Marker markerShowingInfoWindow;
|
||||
private IncidentReport clickedClusterItem;
|
||||
|
||||
private LocationManager locationManager;
|
||||
private LocationListener locationListener;
|
||||
private Location location;
|
||||
|
||||
private static final int MIN_DISTANCE_CHANGE_FOR_UPDATES = 10; // 10 meters
|
||||
private static final int MIN_TIME_BW_UPDATES = 1000 * 60; // 1 minute
|
||||
|
||||
private LatLng myLocation;
|
||||
private LatLng markedLocation;
|
||||
private LatLng curNortheastBounds;
|
||||
@@ -122,13 +133,14 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
mapFragment.getMapAsync(this);
|
||||
|
||||
findViewById(R.id.fab_reportwf_map).setVisibility(View.INVISIBLE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onMapReady(GoogleMap googleMap) {
|
||||
mMap = googleMap;
|
||||
initMap();
|
||||
|
||||
handleIntent(getIntent());
|
||||
initClustering();
|
||||
}
|
||||
@@ -141,33 +153,51 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
|
||||
Log.d(TAG, "Getting permission results...");
|
||||
switch (requestCode) {
|
||||
case MY_PERMISSIONS_REQUEST_LOCATION: {
|
||||
// If request is cancelled, the result arrays are empty.
|
||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
Log.d(TAG, "Permission was granted by user");
|
||||
enableMyLocationButton();
|
||||
getLocation();
|
||||
|
||||
try{
|
||||
mMap.setMyLocationEnabled(true);
|
||||
}catch(SecurityException e){
|
||||
Log.e(TAG,"Security Exception: "+e.toString());
|
||||
} else {
|
||||
Log.d(TAG, "Permission was not granted by user");
|
||||
|
||||
String sDefSystemLanguage = Locale.getDefault().getLanguage();
|
||||
|
||||
switch (sDefSystemLanguage) {
|
||||
case "en":
|
||||
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(
|
||||
new LatLng(51.507351, -0.127758), DEFAULT_ZOOM_LEVEL));
|
||||
break;
|
||||
case "de":
|
||||
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(
|
||||
new LatLng(52.518594, 13.376188), DEFAULT_ZOOM_LEVEL));
|
||||
break;
|
||||
default:
|
||||
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(
|
||||
new LatLng(19.410704, -99.132385), DEFAULT_ZOOM_LEVEL));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// other 'case' lines to check for other
|
||||
// permissions this app might request
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void initMap() {
|
||||
Log.d(TAG, "Init Map");
|
||||
mMap.getUiSettings().setZoomControlsEnabled(true);
|
||||
if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(this,new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION,android.Manifest.permission.ACCESS_COARSE_LOCATION},1);
|
||||
}else{
|
||||
mMap.setMyLocationEnabled(true);
|
||||
}
|
||||
mMap.setMinZoomPreference(MIN_ZOOM_LEVEL);
|
||||
mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {
|
||||
@Override
|
||||
public boolean onMyLocationButtonClick() {
|
||||
getLocation();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
enableMyLocationButton();
|
||||
|
||||
mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {
|
||||
@Override
|
||||
@@ -218,13 +248,13 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
addButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
session.setLocation(Double.doubleToRawLongBits(markedLocation.latitude), Double.doubleToRawLongBits(markedLocation.longitude));
|
||||
session.setManualLocation(Double.doubleToRawLongBits(markedLocation.latitude), Double.doubleToRawLongBits(markedLocation.longitude));
|
||||
Log.d(TAG, "MARKED LOCATION: " + markedLocation.latitude + " " + markedLocation.longitude);
|
||||
gotoSettingsActivity();
|
||||
}
|
||||
});
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
addButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -239,31 +269,23 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
});
|
||||
}
|
||||
|
||||
public GoogleMap.OnCameraChangeListener getCameraChangeListener() {
|
||||
return new GoogleMap.OnCameraChangeListener()
|
||||
{
|
||||
public GoogleMap.OnCameraIdleListener getCameraChangeListener() {
|
||||
return new GoogleMap.OnCameraIdleListener() {
|
||||
@Override
|
||||
public void onCameraChange(CameraPosition position)
|
||||
{
|
||||
mClusterManager.onCameraChange(position);
|
||||
|
||||
if((position.zoom < MIN_ZOOM_LEVEL) && !session.getSubsPremium()) {
|
||||
mMap.animateCamera(CameraUpdateFactory.zoomTo(MIN_ZOOM_LEVEL));
|
||||
showMessage(getString(R.string.txt_map_zoomoutpremium));
|
||||
return;
|
||||
}
|
||||
|
||||
public void onCameraIdle() {
|
||||
mClusterManager.onCameraIdle();
|
||||
CameraPosition position = mMap.getCameraPosition();
|
||||
current_zoom_level = position.zoom;
|
||||
|
||||
if(position.zoom > 13) {
|
||||
if (position.zoom > 13) {
|
||||
PRELOAD_PERCENTAGE = 0.7;
|
||||
}else{
|
||||
} else {
|
||||
PRELOAD_PERCENTAGE = 0.3;
|
||||
}
|
||||
|
||||
LatLngBounds bounds = mMap.getProjection().getVisibleRegion().latLngBounds;
|
||||
|
||||
Log.d("OnCameraChangeListener", "Position: "+bounds.getCenter()+" Zoom: "+position.zoom + " Bounds: NE:" + bounds.northeast + " SW: " + bounds.southwest);
|
||||
Log.d("OnCameraChangeListener", "Position: " + bounds.getCenter() + " Zoom: " + position.zoom + " Bounds: NE:" + bounds.northeast + " SW: " + bounds.southwest);
|
||||
Log.d("OnCameraChangeListener", "Saved Position - Bounds: NE:" + curNortheastBounds + " SW: " + curSouthwestBounds);
|
||||
|
||||
boolean isOutOfBounds = false;
|
||||
@@ -274,39 +296,39 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
double southwestLat, southwestLng;
|
||||
double northeastLat, northeastLng;
|
||||
|
||||
if(bounds.southwest.latitude < bounds.northeast.latitude){
|
||||
if (bounds.southwest.latitude < bounds.northeast.latitude) {
|
||||
southwestLat = bounds.southwest.latitude - distanceLat * PRELOAD_PERCENTAGE;
|
||||
northeastLat = bounds.northeast.latitude + distanceLat * PRELOAD_PERCENTAGE;
|
||||
|
||||
if((curSouthwestBounds != null) && ((bounds.southwest.latitude < curSouthwestBounds.latitude) || (bounds.northeast.latitude > curNortheastBounds.latitude))){
|
||||
if ((curSouthwestBounds != null) && ((bounds.southwest.latitude < curSouthwestBounds.latitude) || (bounds.northeast.latitude > curNortheastBounds.latitude))) {
|
||||
isOutOfBounds = true;
|
||||
}
|
||||
} else {
|
||||
southwestLat = bounds.southwest.latitude + distanceLat * PRELOAD_PERCENTAGE;
|
||||
northeastLat = bounds.northeast.latitude - distanceLat * PRELOAD_PERCENTAGE;
|
||||
|
||||
if((curSouthwestBounds != null) && ((bounds.southwest.latitude > curSouthwestBounds.latitude) || (bounds.northeast.latitude < curNortheastBounds.latitude))){
|
||||
if ((curSouthwestBounds != null) && ((bounds.southwest.latitude > curSouthwestBounds.latitude) || (bounds.northeast.latitude < curNortheastBounds.latitude))) {
|
||||
isOutOfBounds = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(bounds.southwest.longitude < bounds.northeast.longitude){
|
||||
if (bounds.southwest.longitude < bounds.northeast.longitude) {
|
||||
southwestLng = bounds.southwest.longitude - distanceLon * PRELOAD_PERCENTAGE;
|
||||
northeastLng = bounds.northeast.longitude + distanceLon * PRELOAD_PERCENTAGE;
|
||||
|
||||
if((curSouthwestBounds != null) && ((bounds.southwest.longitude < curSouthwestBounds.longitude) || (bounds.northeast.longitude > curNortheastBounds.longitude))){
|
||||
if ((curSouthwestBounds != null) && ((bounds.southwest.longitude < curSouthwestBounds.longitude) || (bounds.northeast.longitude > curNortheastBounds.longitude))) {
|
||||
isOutOfBounds = true;
|
||||
}
|
||||
} else {
|
||||
southwestLng = bounds.southwest.longitude + distanceLon * PRELOAD_PERCENTAGE;
|
||||
northeastLng = bounds.northeast.longitude - distanceLon * PRELOAD_PERCENTAGE;
|
||||
|
||||
if((curSouthwestBounds != null) && ((bounds.southwest.longitude > curSouthwestBounds.longitude) || (bounds.northeast.longitude < curNortheastBounds.longitude))){
|
||||
if ((curSouthwestBounds != null) && ((bounds.southwest.longitude > curSouthwestBounds.longitude) || (bounds.northeast.longitude < curNortheastBounds.longitude))) {
|
||||
isOutOfBounds = true;
|
||||
}
|
||||
}
|
||||
|
||||
if((curSouthwestBounds == null) || isOutOfBounds) {
|
||||
if ((curSouthwestBounds == null) || isOutOfBounds) {
|
||||
curNortheastBounds = new LatLng(northeastLat, northeastLng);
|
||||
curSouthwestBounds = new LatLng(southwestLat, southwestLng);
|
||||
|
||||
@@ -321,7 +343,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
refreshIncidentHeatMap(curNortheastBounds, curSouthwestBounds);
|
||||
markersShown = false;
|
||||
}
|
||||
} else if((position.zoom >= THRESHOLD_ZOOM_LEVEL) && !markersShown){
|
||||
} else if ((position.zoom >= THRESHOLD_ZOOM_LEVEL) && !markersShown) {
|
||||
curNortheastBounds = new LatLng(northeastLat, northeastLng);
|
||||
curSouthwestBounds = new LatLng(southwestLat, southwestLng);
|
||||
|
||||
@@ -330,7 +352,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
refreshIncidentHeatMap(curNortheastBounds, curSouthwestBounds);
|
||||
refreshIncidentMarkers(curNortheastBounds, curSouthwestBounds);
|
||||
markersShown = true;
|
||||
} else if((position.zoom < THRESHOLD_ZOOM_LEVEL) && !markersShown){
|
||||
} else if ((position.zoom < THRESHOLD_ZOOM_LEVEL) && !markersShown) {
|
||||
mClusterManager.clearItems();
|
||||
markersShown = false;
|
||||
}
|
||||
@@ -338,19 +360,18 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
};
|
||||
}
|
||||
|
||||
private void refreshIncidentMarkers(LatLng northeast, LatLng southwest){
|
||||
private void refreshIncidentMarkers(LatLng northeast, LatLng southwest) {
|
||||
showProgress();
|
||||
|
||||
String tag_string_req = "getincidentsfrombound";
|
||||
StringRequest strReq = getStringRequestGetAllIncidentsFromBound(northeast,southwest);
|
||||
StringRequest strReq = getStringRequestGetAllIncidentsFromBound(northeast, southwest);
|
||||
AppController.getInstance().addToRequestQueue(strReq, tag_string_req);
|
||||
}
|
||||
|
||||
private void addIncidentMarkersOnMap(JSONArray incidents){
|
||||
|
||||
private void addIncidentMarkersOnMap(JSONArray incidents) {
|
||||
mClusterManager.clearItems();
|
||||
|
||||
for(int i = 0; i < incidents.length();i++){
|
||||
for (int i = 0; i < incidents.length(); i++) {
|
||||
try {
|
||||
mClusterManager.addItem(new IncidentReport(incidents.getJSONObject(i)));
|
||||
} catch (JSONException e) {
|
||||
@@ -361,7 +382,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
mClusterManager.cluster();
|
||||
}
|
||||
|
||||
private void refreshIncidentHeatMap(LatLng northeast, LatLng southwest){
|
||||
private void refreshIncidentHeatMap(LatLng northeast, LatLng southwest) {
|
||||
showProgress();
|
||||
|
||||
String tag_string_req = "getincidentsforheatmapfrombound";
|
||||
@@ -369,10 +390,10 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
AppController.getInstance().addToRequestQueue(strReq, tag_string_req);
|
||||
}
|
||||
|
||||
private void addIncidentMarkersOnHeatMap(JSONArray incidents){
|
||||
private void addIncidentMarkersOnHeatMap(JSONArray incidents) {
|
||||
ArrayList<WeightedLatLng> heatMapPositions = new ArrayList<>();
|
||||
|
||||
for(int i = 0; i < incidents.length();i++){
|
||||
for (int i = 0; i < incidents.length(); i++) {
|
||||
try {
|
||||
heatMapPositions.add(new WeightedLatLng(new LatLng(incidents.getJSONObject(i).getDouble("latitude"), incidents.getJSONObject(i).getDouble("longitude")), 1.0));
|
||||
} catch (JSONException e) {
|
||||
@@ -380,25 +401,22 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
}
|
||||
}
|
||||
|
||||
if(mProvider == null){
|
||||
if (mProvider == null) {
|
||||
mProvider = new HeatmapTileProvider.Builder()
|
||||
.radius(50)
|
||||
.weightedData(heatMapPositions)
|
||||
.opacity(0.7)
|
||||
.build();
|
||||
|
||||
|
||||
mOverlay = mMap.addTileOverlay(new TileOverlayOptions().tileProvider(mProvider));
|
||||
Log.d("HEATMAP", "HeatMap initialized");
|
||||
}else{
|
||||
} else {
|
||||
mProvider.setWeightedData(heatMapPositions);
|
||||
mOverlay.clearTileCache();
|
||||
Log.d("HEATMAP", "HeatMap updated");
|
||||
}
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestGetAllIncidentsForHeatMapFromBound(final LatLng northeast, final LatLng southwest) {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_GET_INCIDENTS_FROMBOUND_FORHEATMAP, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -410,7 +428,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
|
||||
if (!error) {
|
||||
JSONArray incidents = jObj.getJSONArray("msg");
|
||||
Log.d(TAG, "HeatMap positions response length: " + incidents .length());
|
||||
Log.d(TAG, "HeatMap positions response length: " + incidents.length());
|
||||
addIncidentMarkersOnHeatMap(incidents);
|
||||
} else {
|
||||
String errorMsg = jObj.getString("error_msg");
|
||||
@@ -432,7 +450,6 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_GET_INCIDENTS_FROMBOUND_FORHEATMAP);
|
||||
params.put("uid", user.get(SessionManager.KEY_UID));
|
||||
params.put("token", user.get(SessionManager.TOKEN));
|
||||
params.put("nelat", Double.toString(northeast.latitude));
|
||||
@@ -446,7 +463,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestGetAllIncidentsFromBound(final LatLng northeast, final LatLng southwest) {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_GET_INCIDENTS_FROMBOUND, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -480,7 +497,6 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_GET_INCIDENTS_FROMBOUND);
|
||||
params.put("uid", user.get(SessionManager.KEY_UID));
|
||||
params.put("token", user.get(SessionManager.TOKEN));
|
||||
params.put("nelat", Double.toString(northeast.latitude));
|
||||
@@ -495,7 +511,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
|
||||
private void initClustering() {
|
||||
mClusterManager = new ClusterManager<>(this, mMap);
|
||||
mMap.setOnCameraChangeListener(getCameraChangeListener());
|
||||
mMap.setOnCameraIdleListener(getCameraChangeListener());
|
||||
|
||||
mClusterManager.setRenderer(new OwnIconRendered(MapsActivity.this, mMap, mClusterManager));
|
||||
|
||||
@@ -519,7 +535,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
new MyCustomAdapterForItems());
|
||||
}
|
||||
|
||||
private void loadInfoWindowInformation(View infoView, String incidentID){
|
||||
private void loadInfoWindowInformation(View infoView, String incidentID) {
|
||||
showProgress();
|
||||
|
||||
String tag_string_req = "getincidentscoreforinfowindow";
|
||||
@@ -528,7 +544,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestGetIncidentScoreForInfoWindow(final View infoView, final String incidentID) {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_GET_INCIDENT, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -545,7 +561,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
TextView tvUsername = ((TextView) infoView.findViewById(R.id.txt_infowindow_fromuser));
|
||||
RatingBar rbScore = ((RatingBar) infoView.findViewById(R.id.rb_infowindow_rating));
|
||||
|
||||
tvUsername.setText(String.format("%s %s",getString(R.string.lbl_mapsinfowindow_author),clickedClusterItem.getFromUsername()));
|
||||
tvUsername.setText(String.format("%s %s", getString(R.string.lbl_mapsinfowindow_author), clickedClusterItem.getFromUsername()));
|
||||
rbScore.setRating(clickedClusterItem.getScoreStars());
|
||||
|
||||
if (markerShowingInfoWindow != null && markerShowingInfoWindow.isInfoWindowShown()) {
|
||||
@@ -554,7 +570,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
}
|
||||
} else {
|
||||
String errorMsg = jObj.getString("error_msg");
|
||||
Log.e(TAG, "Error getting incident details (server returned error): " + errorMsg);
|
||||
Log.i(TAG, "Error getting incident details (server returned error): " + errorMsg);
|
||||
showMessage(getResources().getString(R.string.txt_errormsg_getinfowindow));
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
@@ -573,7 +589,6 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", "getincidentfromincidentid");
|
||||
params.put("uid", user.get(SessionManager.KEY_UID));
|
||||
params.put("token", user.get(SessionManager.TOKEN));
|
||||
params.put("incidentid", incidentID);
|
||||
@@ -583,9 +598,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
public class MyCustomAdapterForItems implements GoogleMap.InfoWindowAdapter {
|
||||
|
||||
private class MyCustomAdapterForItems implements GoogleMap.InfoWindowAdapter {
|
||||
private final View myContentsView;
|
||||
|
||||
MyCustomAdapterForItems() {
|
||||
@@ -618,59 +631,42 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
tvCategory.setText(clickedClusterItem.getIncidentCategoryName(getApplicationContext()));
|
||||
tvSubcategory.setText(clickedClusterItem.getIncidentSubCategoryName(getApplicationContext()));
|
||||
|
||||
tvSuspect.setText(String.format("%s %s",getString(R.string.lbl_mapsinfowindow_suspect),clickedClusterItem.getSuspectString(getApplicationContext())));
|
||||
tvVictim.setText(String.format("%s %s",getString(R.string.lbl_mapsinfowindow_victim),clickedClusterItem.getVictimString(getApplicationContext())));
|
||||
tvSuspect.setText(String.format("%s %s", getString(R.string.lbl_mapsinfowindow_suspect), clickedClusterItem.getSuspectString(getApplicationContext())));
|
||||
tvVictim.setText(String.format("%s %s", getString(R.string.lbl_mapsinfowindow_victim), clickedClusterItem.getVictimString(getApplicationContext())));
|
||||
tvTime.setText(String.format("%s %s", getString(R.string.lbl_mapsinfowindow_time), clickedClusterItem.getTimeString(getApplicationContext())));
|
||||
}
|
||||
return myContentsView;
|
||||
}
|
||||
}
|
||||
|
||||
private void handleIntent(Intent intent){
|
||||
if(Intent.ACTION_SEARCH.equals(intent.getAction()))
|
||||
{
|
||||
private void handleIntent(Intent intent) {
|
||||
if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
|
||||
String query = intent.getStringExtra(SearchManager.QUERY);
|
||||
doSearch(query);
|
||||
} else if(Intent.ACTION_VIEW.equals(intent.getAction())) {
|
||||
} else if (Intent.ACTION_VIEW.equals(intent.getAction())) {
|
||||
getPlace(intent.getStringExtra(SearchManager.EXTRA_DATA_KEY));
|
||||
} else {
|
||||
String intentMessage = intent.getStringExtra(EXTRA_MESSAGE);
|
||||
|
||||
if(intentMessage != null && intentMessage.contains(":")) {
|
||||
if (intentMessage != null && intentMessage.contains(":")) {
|
||||
String[] position = intentMessage.split(":");
|
||||
|
||||
String latitude = position[0];
|
||||
String longitude = position[1];
|
||||
|
||||
LatLng point = new LatLng(Double.parseDouble(latitude),Double.parseDouble(longitude));
|
||||
LatLng point = new LatLng(Double.parseDouble(latitude), Double.parseDouble(longitude));
|
||||
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(point, DEFAULT_ZOOM_LEVEL));
|
||||
if(getIntent().hasExtra(AppConfig.EXTRA_MAP_TYPE)) mMarker = mMap.addMarker(new MarkerOptions().position(point));
|
||||
if (getIntent().hasExtra(AppConfig.EXTRA_MAP_TYPE))
|
||||
mMarker = mMap.addMarker(new MarkerOptions().position(point));
|
||||
} else {
|
||||
LatLng myPosition = session.getLocation();
|
||||
|
||||
if ((myPosition != null) && (myPosition.latitude != 0.0) && (myPosition.longitude != 0.0))
|
||||
{
|
||||
if ((myPosition != null) && (myPosition.latitude != 0.0) && (myPosition.longitude != 0.0)) {
|
||||
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(myPosition.latitude, myPosition.longitude), DEFAULT_ZOOM_LEVEL));
|
||||
}else{
|
||||
String sDefSystemLanguage = Locale.getDefault().getLanguage();
|
||||
|
||||
switch (sDefSystemLanguage) {
|
||||
case "en":
|
||||
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(
|
||||
new LatLng(51.507351, -0.127758), DEFAULT_ZOOM_LEVEL));
|
||||
break;
|
||||
case "de":
|
||||
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(
|
||||
new LatLng(52.518594, 13.376188), DEFAULT_ZOOM_LEVEL));
|
||||
break;
|
||||
default:
|
||||
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(
|
||||
new LatLng(19.410704, -99.132385), DEFAULT_ZOOM_LEVEL));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
getLocation();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -680,7 +676,9 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onClusterClick(Cluster<IncidentReport> cluster) { return false; }
|
||||
public boolean onClusterClick(Cluster<IncidentReport> cluster) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClusterItemInfoWindowClick(IncidentReport incidentReport) {
|
||||
@@ -694,53 +692,162 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
handleIntent(intent);
|
||||
}
|
||||
|
||||
private void doSearch(String query){
|
||||
private void doSearch(String query) {
|
||||
Bundle data = new Bundle();
|
||||
data.putString("query", query);
|
||||
getSupportLoaderManager().restartLoader(0, data, this);
|
||||
}
|
||||
|
||||
private void getPlace(String query){
|
||||
private void getPlace(String query) {
|
||||
Bundle data = new Bundle();
|
||||
data.putString("query", query);
|
||||
getSupportLoaderManager().restartLoader(1, data, this);
|
||||
}
|
||||
|
||||
private void showLocations(Cursor c){
|
||||
private void showLocations(Cursor c) {
|
||||
MarkerOptions markerOptions;
|
||||
LatLng position = null;
|
||||
|
||||
while(c.moveToNext()){
|
||||
while (c.moveToNext()) {
|
||||
markerOptions = new MarkerOptions();
|
||||
position = new LatLng(Double.parseDouble(c.getString(1)),Double.parseDouble(c.getString(2)));
|
||||
position = new LatLng(Double.parseDouble(c.getString(1)), Double.parseDouble(c.getString(2)));
|
||||
markerOptions.position(position);
|
||||
markerOptions.title(c.getString(0));
|
||||
}
|
||||
if(position!=null){
|
||||
if (position != null) {
|
||||
CameraUpdate cameraPosition = CameraUpdateFactory.newLatLng(position);
|
||||
mMap.animateCamera(cameraPosition);
|
||||
}
|
||||
|
||||
if (position != null) {
|
||||
myLocation = new LatLng(position.latitude,position.longitude);
|
||||
myLocation = new LatLng(position.latitude, position.longitude);
|
||||
}
|
||||
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(myLocation, DEFAULT_ZOOM_LEVEL));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaderReset(Loader<Cursor> arg0) {}
|
||||
public void onLoaderReset(Loader<Cursor> arg0) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Loader<Cursor> onCreateLoader(int arg0, Bundle query) {
|
||||
CursorLoader cLoader = null;
|
||||
if(arg0==0)
|
||||
cLoader = new CursorLoader(getBaseContext(), PlaceProvider.SEARCH_URI, null, null, new String[]{query.getString("query") }, null);
|
||||
else if(arg0==1)
|
||||
cLoader = new CursorLoader(getBaseContext(), PlaceProvider.DETAILS_URI, null, null, new String[]{ query.getString("query") }, null);
|
||||
if (arg0 == 0)
|
||||
cLoader = new CursorLoader(getBaseContext(), PlaceProvider.SEARCH_URI, null, null, new String[]{query.getString("query")}, null);
|
||||
else if (arg0 == 1)
|
||||
cLoader = new CursorLoader(getBaseContext(), PlaceProvider.DETAILS_URI, null, null, new String[]{query.getString("query")}, null);
|
||||
return cLoader;
|
||||
|
||||
}
|
||||
|
||||
private class MyLocationListener implements LocationListener {
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(Location loc) {
|
||||
if (loc.getLongitude() != 0.0 && loc.getLatitude() != 0.0) {
|
||||
Log.d(TAG, "Save GPS as new location...");
|
||||
if (session.getLocation() == null || session.getLocation().latitude == 0.0 || session.getLocation().longitude == 0.0) {
|
||||
session.setLocation(Double.doubleToRawLongBits(loc.getLatitude()), Double.doubleToRawLongBits(loc.getLongitude()));
|
||||
} else {
|
||||
session.setLocation(Double.doubleToRawLongBits(loc.getLatitude()), Double.doubleToRawLongBits(loc.getLongitude()));
|
||||
}
|
||||
|
||||
session.setNotificationServiceReady(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderDisabled(String provider) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderEnabled(String provider) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusChanged(String provider, int status, Bundle extras) {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isLocationEnabled() {
|
||||
return locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) ||
|
||||
locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
|
||||
}
|
||||
|
||||
public Location getLocation() {
|
||||
//check for permission
|
||||
Log.d(TAG, "Permission for GPS not granted yet - ask for permission now");
|
||||
if (ActivityCompat.checkSelfPermission(getApplicationContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getApplicationContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(this, new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION}, MY_PERMISSIONS_REQUEST_LOCATION);
|
||||
} else {
|
||||
Log.d(TAG, "Permission for GPS granted - get position");
|
||||
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
|
||||
locationListener = new MyLocationListener();
|
||||
|
||||
try {
|
||||
|
||||
if (!isLocationEnabled()) {
|
||||
showMessage("Please activate GPS in your android settings.");
|
||||
Log.d(TAG, "Locationservice not enabled");
|
||||
} else {
|
||||
Log.d(TAG, "Locationservice enabled - check type");
|
||||
|
||||
// if GPS Enabled get lat/long using GPS Services
|
||||
if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
|
||||
Log.d(TAG, "Locationservice enabled - GPS Provider Found");
|
||||
if (location == null) {
|
||||
locationManager.requestLocationUpdates(
|
||||
LocationManager.GPS_PROVIDER,
|
||||
MIN_TIME_BW_UPDATES,
|
||||
MIN_DISTANCE_CHANGE_FOR_UPDATES, locationListener);
|
||||
Log.d(TAG, "GPS location from GPS Service activated");
|
||||
if (locationManager != null) {
|
||||
location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
|
||||
if (location != null) {
|
||||
myLocation = new LatLng(location.getLatitude(), location.getLongitude());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)) {
|
||||
// get location from Network Provider
|
||||
Log.d(TAG, "Locationservice enabled - Network Provider Found");
|
||||
locationManager.requestLocationUpdates(
|
||||
LocationManager.NETWORK_PROVIDER,
|
||||
MIN_TIME_BW_UPDATES,
|
||||
MIN_DISTANCE_CHANGE_FOR_UPDATES, locationListener);
|
||||
Log.d(TAG, "GPS location from Network Provider activated");
|
||||
if (locationManager != null) {
|
||||
location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
|
||||
if (location != null) {
|
||||
myLocation = new LatLng(location.getLatitude(), location.getLongitude());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mMap.moveCamera(CameraUpdateFactory.newLatLng(myLocation));
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return location;
|
||||
}
|
||||
|
||||
private void enableMyLocationButton() {
|
||||
try{
|
||||
mMap.setMyLocationEnabled(true);
|
||||
MapFragment mapFragment = (MapFragment) getFragmentManager().findFragmentById(R.id.frag_maps_map);
|
||||
View locationButton = ((View) mapFragment.getView().findViewById(Integer.parseInt("1")).getParent()).findViewById(Integer.parseInt("2"));
|
||||
RelativeLayout.LayoutParams rlp = (RelativeLayout.LayoutParams) locationButton.getLayoutParams();
|
||||
rlp.setMargins(0, 250, 30, 30);
|
||||
}catch(SecurityException se){
|
||||
ActivityCompat.requestPermissions(this, new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION}, MY_PERMISSIONS_REQUEST_LOCATION);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFinished(Loader<Cursor> arg0, Cursor c) {
|
||||
showLocations(c);
|
||||
@@ -756,19 +863,27 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
SearchableInfo searchInfo = searchManager.getSearchableInfo(getComponentName());
|
||||
searchView.setSearchableInfo(searchInfo);
|
||||
|
||||
EditText txtSearch = ((EditText)searchView.findViewById(android.support.v7.appcompat.R.id.search_src_text));
|
||||
EditText txtSearch = ((EditText) searchView.findViewById(android.support.v7.appcompat.R.id.search_src_text));
|
||||
txtSearch.setHint(getResources().getString(R.string.search_hint));
|
||||
txtSearch.setHintTextColor(Color.LTGRAY);
|
||||
txtSearch.setTextColor(Color.WHITE);
|
||||
txtSearch.setHintTextColor(Color.DKGRAY);
|
||||
txtSearch.setTextColor(Color.BLACK);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause(){
|
||||
super.onPause();
|
||||
if(showAdd) showAd();
|
||||
protected void onPause() {
|
||||
Log.d(TAG,"onPause executed: LM: "+(locationManager != null)+" LL: "+(locationListener!=null));
|
||||
if(locationManager != null && locationListener != null) {
|
||||
locationManager.removeUpdates(locationListener);
|
||||
locationListener = null;
|
||||
locationManager = null;
|
||||
}
|
||||
|
||||
|
||||
super.onPause();
|
||||
|
||||
if (showAdd) showAd();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -781,21 +896,21 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
||||
return getResources().getString(R.string.title_activity_maps);
|
||||
}
|
||||
|
||||
private void showProgress(){
|
||||
private void showProgress() {
|
||||
findViewById(R.id.pb_map_progress).setVisibility(View.VISIBLE);
|
||||
pbCounter++;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume(){
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
navDrawer.setSelection(mapAvtivityID, false);
|
||||
showAdd = true;
|
||||
}
|
||||
|
||||
private void hideProgress(){
|
||||
private void hideProgress() {
|
||||
pbCounter--;
|
||||
if(pbCounter == 0){
|
||||
if (pbCounter == 0) {
|
||||
findViewById(R.id.pb_map_progress).setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,6 @@ import com.android.volley.toolbox.StringRequest;
|
||||
import com.beardedhen.androidbootstrap.BootstrapButton;
|
||||
import com.beardedhen.androidbootstrap.api.defaults.DefaultBootstrapBrand;
|
||||
import com.google.android.gms.maps.model.LatLng;
|
||||
import com.google.android.gms.plus.Plus;
|
||||
import com.google.android.gms.plus.model.people.Person;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import org.deke.risk.riskahead.fragment.BaseReportWFFragment;
|
||||
@@ -123,7 +121,7 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
||||
|
||||
private void initButtonsAndElements() {
|
||||
btnContinue = (BootstrapButton) findViewById(R.id.btn_reportwf_next);
|
||||
btnContinue.setVisibility(View.INVISIBLE);
|
||||
btnContinue.setEnabled(false);
|
||||
btnContinue.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -133,7 +131,7 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
||||
});
|
||||
|
||||
btnReportNow = (BootstrapButton) findViewById(R.id.btn_reportwf_reportnow);
|
||||
btnReportNow.setVisibility(View.INVISIBLE);
|
||||
btnReportNow.setEnabled(false);
|
||||
btnReportNow.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -171,8 +169,8 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
||||
}
|
||||
|
||||
if(state == (fragList.size()-1)){
|
||||
btnContinue.setVisibility(View.INVISIBLE);
|
||||
btnReportNow.setVisibility(View.INVISIBLE);
|
||||
btnContinue.setEnabled(false);
|
||||
btnReportNow.setEnabled(false);
|
||||
siteIndicator.setVisibility(View.INVISIBLE);
|
||||
}else{
|
||||
siteIndicator.setVisibility(View.VISIBLE);
|
||||
@@ -254,15 +252,15 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
||||
}
|
||||
|
||||
if((currentState == 1 && finished) || (currentState > 1)){
|
||||
btnReportNow.setVisibility(View.VISIBLE);
|
||||
btnReportNow.setEnabled(true);
|
||||
}else{
|
||||
btnReportNow.setVisibility(View.INVISIBLE);
|
||||
btnReportNow.setEnabled(false);
|
||||
}
|
||||
|
||||
if(finished || currentState > 1){
|
||||
btnContinue.setVisibility(View.VISIBLE);
|
||||
btnContinue.setEnabled(true);
|
||||
}else{
|
||||
btnContinue.setVisibility(View.INVISIBLE);
|
||||
btnContinue.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -315,7 +313,7 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
||||
|
||||
private StringRequest getStringRequestAddIncidentWithPosition(final IncidentReport incident) {
|
||||
showDialog();
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_ADD_INCIDENT_WITHPOSITION, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -327,8 +325,7 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
||||
|
||||
if (!error) {
|
||||
showMessage(getString(R.string.txt_success_addreport));
|
||||
|
||||
showDialogWhenReportAdded(incident);
|
||||
showShareDialog(incident);
|
||||
} else {
|
||||
String errorMsg = jObj.getString("error_msg");
|
||||
Log.e(TAG, "Error adding incident (Server returned error): " + errorMsg);
|
||||
@@ -352,7 +349,6 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_ADD_INCIDENT_WITHPOSITION);
|
||||
params.put("uid", user.get(SessionManager.KEY_UID));
|
||||
params.put("token", user.get(SessionManager.TOKEN));
|
||||
params.put("latitude", Double.toString(incident.getPosition().latitude));
|
||||
@@ -389,33 +385,20 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
||||
};
|
||||
}
|
||||
|
||||
private void showDialogWhenReportAdded(final IncidentReport incident) {
|
||||
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(this, new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE}, MY_PERMISSIONS_REQUEST_STORAGE);
|
||||
return;
|
||||
}else{
|
||||
showShareDialog(incident);
|
||||
}
|
||||
private void requestPermission(){
|
||||
ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, MY_PERMISSIONS_REQUEST_STORAGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode,
|
||||
String permissions[], int[] grantResults) {
|
||||
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
|
||||
switch (requestCode) {
|
||||
case MY_PERMISSIONS_REQUEST_STORAGE: {
|
||||
// If request is cancelled, the result arrays are empty.
|
||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
|
||||
showShareDialog(incident);
|
||||
|
||||
startShareIncidentIntent(incident);
|
||||
} else {
|
||||
finishReportAndGotoMap(incident);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// other 'case' lines to check for other
|
||||
// permissions this app might request
|
||||
}
|
||||
}
|
||||
|
||||
@@ -425,13 +408,7 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
||||
.setMessage(R.string.txt_share_message)
|
||||
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
resetStateAndIncident();
|
||||
gotoMapActivity(incident.getPosition().latitude + ":" + incident.getPosition().longitude);
|
||||
|
||||
|
||||
startShareIncidentIntent(incident);
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
.setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {
|
||||
@@ -441,28 +418,47 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
||||
})
|
||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||
.show();
|
||||
|
||||
}
|
||||
|
||||
private void startShareIncidentIntent(IncidentReport incident) {
|
||||
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
|
||||
Bitmap icon = BitmapFactory.decodeResource(getApplicationContext().getResources(),
|
||||
R.drawable.ra_qrcode);
|
||||
String text = getString(R.string.txt_share_hint)
|
||||
+getString(R.string.txt_share_hint2)+": "+ incident.getIncidentCategoryName(getApplicationContext())
|
||||
+" - "+incident.getIncidentSubCategoryName(getApplicationContext())+"\n"
|
||||
+getString(R.string.txt_share_hint3)+": "+ incident.getIncidentPositionDescription().split("\\n")[0] + " - " + incident.getIncidentPositionDescription().split("\\n")[1] + "\n"
|
||||
+getString(R.string.txt_share_page);
|
||||
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
||||
|
||||
sharingIntent.putExtra(Intent.EXTRA_TEXT, text);
|
||||
sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(MediaStore.Images.Media.insertImage(getApplicationContext().getContentResolver(), icon, "Share incident", null)));
|
||||
sharingIntent.setType("image/*");
|
||||
sharingIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
startActivity(Intent.createChooser(sharingIntent, getString(R.string.txt_share_acttitle)));
|
||||
AlertDialog alertDialog = new AlertDialog.Builder(this).create();
|
||||
alertDialog.setTitle("Request Permission");
|
||||
alertDialog.setMessage("If you want to use the sharing feature in the future we need storage permission to generate the message which should be shared.");
|
||||
alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, "OK",
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
requestPermission();
|
||||
}
|
||||
});
|
||||
alertDialog.show();
|
||||
|
||||
}else{
|
||||
resetStateAndIncident();
|
||||
gotoMapActivity(incident.getPosition().latitude + ":" + incident.getPosition().longitude);
|
||||
|
||||
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
|
||||
Bitmap icon = BitmapFactory.decodeResource(getApplicationContext().getResources(),
|
||||
R.drawable.ra_qrcode);
|
||||
String text = getString(R.string.txt_share_hint)
|
||||
+getString(R.string.txt_share_hint2)+": "+ incident.getIncidentCategoryName(getApplicationContext())
|
||||
+" - "+incident.getIncidentSubCategoryName(getApplicationContext())+"\n"
|
||||
+getString(R.string.txt_share_hint3)+": "+ incident.getIncidentPositionDescription().split("\\n")[0] + " - " + incident.getIncidentPositionDescription().split("\\n")[1] + "\n"
|
||||
+getString(R.string.txt_share_page);
|
||||
|
||||
sharingIntent.putExtra(Intent.EXTRA_TEXT, text);
|
||||
sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(MediaStore.Images.Media.insertImage(getApplicationContext().getContentResolver(), icon, "Share incident", null)));
|
||||
sharingIntent.setType("image/*");
|
||||
sharingIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
startActivity(Intent.createChooser(sharingIntent, getString(R.string.txt_share_acttitle)));
|
||||
}
|
||||
}
|
||||
|
||||
private void finishReportAndGotoMap(IncidentReport incident) {
|
||||
resetStateAndIncident();
|
||||
showAd();
|
||||
gotoMapActivity(incident.getPosition().latitude + ":" + incident.getPosition().longitude);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
package org.deke.risk.riskahead;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import org.deke.risk.riskahead.helper.AppConfig;
|
||||
import org.deke.risk.riskahead.helper.SessionManager;
|
||||
|
||||
/**
|
||||
*
|
||||
* (C) Copyright 2016 RiskAhead (http://www.riskahead.net)
|
||||
* Developer & Contributor: Dennis Thießen (dennis.thiessen@riskahead.net)
|
||||
* Date of Release: 10.02.2016
|
||||
*
|
||||
*/
|
||||
public class StartActivity extends AppCompatActivity {
|
||||
|
||||
private final static String TAG = StartActivity.class.getSimpleName();
|
||||
|
||||
Button btnLogin;
|
||||
Button btnRegister;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
Log.d(TAG,"RiskAhead started.");
|
||||
|
||||
setContentView(R.layout.activity_start);
|
||||
|
||||
btnLogin = (Button) findViewById(R.id.btn_start_login);
|
||||
btnRegister = (Button) findViewById(R.id.btn_start_register);
|
||||
|
||||
SessionManager session = new SessionManager(getApplicationContext());
|
||||
if (session.isLoggedIn()) {
|
||||
Log.d(TAG,"User found in sharedPrefs and is therefore logged in. Continue to internal Area.");
|
||||
Intent intent = new Intent(StartActivity.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
public void gotoLogin(View view) {
|
||||
Intent intent = new Intent(this, LoginActivity.class);
|
||||
intent.putExtra(AppConfig.EXTRA_MESSAGE, AppConfig.INTENT_LOGIN);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void gotoRegister(View view) {
|
||||
Intent intent = new Intent(this, LoginActivity.class);
|
||||
intent.putExtra(AppConfig.EXTRA_MESSAGE, AppConfig.INTENT_REGISTER);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.menu_common, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -309,7 +309,7 @@ public class SubscriptionsActivity extends BaseActivity{
|
||||
}
|
||||
|
||||
private StringRequest getStringAddSubscription(final String productId, final String type, final String price, final String currency) {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_ADD_SUBSCRIPTIONS, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -345,7 +345,6 @@ public class SubscriptionsActivity extends BaseActivity{
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", "addsubscription");
|
||||
params.put("uid", user.get(SessionManager.KEY_UID));
|
||||
params.put("token", user.get(SessionManager.TOKEN));
|
||||
params.put("productid", productId);
|
||||
@@ -365,7 +364,7 @@ public class SubscriptionsActivity extends BaseActivity{
|
||||
}
|
||||
|
||||
private StringRequest getStringGetSubscriptions(final String userId) {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_GET_SUBSCRIPTIONS, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -407,7 +406,6 @@ public class SubscriptionsActivity extends BaseActivity{
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", "getsubscriptions");
|
||||
params.put("uid", user.get(SessionManager.KEY_UID));
|
||||
params.put("token", user.get(SessionManager.TOKEN));
|
||||
params.put("userid", userId);
|
||||
@@ -426,7 +424,7 @@ public class SubscriptionsActivity extends BaseActivity{
|
||||
}
|
||||
|
||||
private StringRequest getStringDeactivateSubscriptions(final String subscriptionId) {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_DEACTIVATE_SUBSCRIPTIONS, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -457,7 +455,6 @@ public class SubscriptionsActivity extends BaseActivity{
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", "deactivatesubscription");
|
||||
params.put("uid", user.get(SessionManager.KEY_UID));
|
||||
params.put("token", user.get(SessionManager.TOKEN));
|
||||
params.put("subid", subscriptionId);
|
||||
|
||||
@@ -158,7 +158,7 @@ public class ViewReportActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestDeleteIncident(final Integer incidentid) {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_DEACTIVATE_INCIDENT, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -194,7 +194,6 @@ public class ViewReportActivity extends BaseActivity {
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_DEACTIVATE_INCIDENT);
|
||||
params.put("uid", user.get(SessionManager.KEY_UID));
|
||||
params.put("token", user.get(SessionManager.TOKEN));
|
||||
params.put("incidentid", incidentid.toString());
|
||||
@@ -213,7 +212,7 @@ public class ViewReportActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestGetIncidentWithPositionFromID(final Integer incidentid) {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_GET_INCIDENT, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -253,7 +252,6 @@ public class ViewReportActivity extends BaseActivity {
|
||||
protected Map<String, String> getParams() {
|
||||
// Posting parameters to login url
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_GET_INCIDENTS_FROMINCIDENTID);
|
||||
params.put("uid", user.get(SessionManager.KEY_UID));
|
||||
params.put("token", user.get(SessionManager.TOKEN));
|
||||
params.put("incidentid", incidentid.toString());
|
||||
@@ -447,7 +445,7 @@ public class ViewReportActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestAddVote(final Integer incidentid, final String votetype) {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_ADD_VOTE, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -484,7 +482,6 @@ public class ViewReportActivity extends BaseActivity {
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_ADD_VOTE);
|
||||
params.put("uid", user.get(SessionManager.KEY_UID));
|
||||
params.put("token", user.get(SessionManager.TOKEN));
|
||||
params.put("incidentid", incidentid.toString());
|
||||
@@ -502,7 +499,7 @@ public class ViewReportActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestDeleteVote(final Integer incidentid) {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_DELETE_VOTE, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -537,7 +534,6 @@ public class ViewReportActivity extends BaseActivity {
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_DELETE_VOTE);
|
||||
params.put("uid", user.get(SessionManager.KEY_UID));
|
||||
params.put("token", user.get(SessionManager.TOKEN));
|
||||
params.put("incidentid", incidentid.toString());
|
||||
|
||||
@@ -76,8 +76,6 @@ public class FacebookButtonFragment extends Fragment {
|
||||
FacebookSdk.sdkInitialize(getContext());
|
||||
callbackManager = CallbackManager.Factory.create();
|
||||
initFacebookButton();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -112,13 +110,13 @@ public class FacebookButtonFragment extends Fragment {
|
||||
@Override
|
||||
public void onCancel() {
|
||||
Log.d("FB","OnCancel");
|
||||
((LoginActivity) getActivity()).showMessage("Facebook LogIn canceled");
|
||||
((LoginActivity) getActivity()).showMessage("Facebook LogIn canceled. Please use E-Mail instead.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(FacebookException exception) {
|
||||
Log.d("FB","OnError");
|
||||
((LoginActivity) getActivity()).showMessage("Error while SignIn: ErrorMsg: " + exception.toString());
|
||||
Log.d("FB","OnError: " + exception.toString());
|
||||
((LoginActivity) getActivity()).showMessage("Could not log in with Facebook. Please use E-Mail instead or try again later.");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -127,7 +125,6 @@ public class FacebookButtonFragment extends Fragment {
|
||||
GraphRequest request = GraphRequest.newMeRequest(accesstoken, new GraphRequest.GraphJSONObjectCallback() {
|
||||
@Override
|
||||
public void onCompleted(JSONObject objects, GraphResponse response) {
|
||||
|
||||
try {
|
||||
((LoginActivity) getActivity()).handleSocialMediaLogin(objects.getString("id"), "facebook", objects.getString("first_name"), objects.getString("email"));
|
||||
} catch (JSONException e) {
|
||||
|
||||
@@ -2,7 +2,9 @@ package org.deke.risk.riskahead.fragment;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentSender;
|
||||
import android.content.pm.PackageManager;
|
||||
@@ -82,11 +84,28 @@ public class GooglePlusButtonFragment extends Fragment implements GoogleApiClien
|
||||
}
|
||||
|
||||
private void performClickAction() {
|
||||
|
||||
Log.d(TAG,"Click on Google+ Button performed");
|
||||
if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.GET_ACCOUNTS) != PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.GET_ACCOUNTS}, MY_PERMISSIONS_REQUEST_ACCOUNTS);
|
||||
Log.d(TAG,"Permission not granted yet - request now");
|
||||
|
||||
// Should we show an explanation?
|
||||
AlertDialog alertDialog = new AlertDialog.Builder(getActivity()).create();
|
||||
alertDialog.setTitle("Request Permission");
|
||||
alertDialog.setMessage("Google needs permission to see your profile (Contact List) in order to enable log-in with Google+. However, if you do not grant permission, log in with Google+ will not be available.");
|
||||
alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, "OK",
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
requestPermissions(new String[]{Manifest.permission.GET_ACCOUNTS}, MY_PERMISSIONS_REQUEST_ACCOUNTS);
|
||||
}
|
||||
});
|
||||
alertDialog.show();
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
Log.d(TAG,"Permission already granted");
|
||||
|
||||
if(mGoogleApiClient.isConnected()){
|
||||
Person currentPerson = getProfileInformation();
|
||||
((LoginActivity) getActivity()).handleSocialMediaLogin(currentPerson.getId(),"google",currentPerson.getDisplayName(),Plus.AccountApi.getAccountName(mGoogleApiClient));
|
||||
@@ -97,28 +116,28 @@ public class GooglePlusButtonFragment extends Fragment implements GoogleApiClien
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode,
|
||||
String permissions[], int[] grantResults) {
|
||||
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
|
||||
Log.d(TAG,"RequestCode: "+requestCode);
|
||||
|
||||
switch (requestCode) {
|
||||
case MY_PERMISSIONS_REQUEST_ACCOUNTS: {
|
||||
// If request is cancelled, the result arrays are empty.
|
||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
Log.d(TAG,"Permission granted");
|
||||
|
||||
if(mGoogleApiClient.isConnected()){
|
||||
Person currentPerson = getProfileInformation();
|
||||
((LoginActivity) getActivity()).handleSocialMediaLogin(currentPerson.getId(),"google",currentPerson.getDisplayName(),Plus.AccountApi.getAccountName(mGoogleApiClient));
|
||||
}else{
|
||||
signInWithGplus();
|
||||
signInWithGplus();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Log.d(TAG,"Permission not granted - what now?");
|
||||
Toast.makeText(mContext, "Could not log in with Google+. Please use E-Mail instead or try again later.",
|
||||
Toast.LENGTH_LONG).show();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// other 'case' lines to check for other
|
||||
// permissions this app might request
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +181,6 @@ public class GooglePlusButtonFragment extends Fragment implements GoogleApiClien
|
||||
}
|
||||
|
||||
if (!mIntentInProgress) {
|
||||
|
||||
mConnectionResult = result;
|
||||
|
||||
if (mSignInClicked) {
|
||||
@@ -171,7 +189,6 @@ public class GooglePlusButtonFragment extends Fragment implements GoogleApiClien
|
||||
resolveSignInError();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -187,8 +204,6 @@ public class GooglePlusButtonFragment extends Fragment implements GoogleApiClien
|
||||
mGoogleApiClient.connect();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sign-in into google
|
||||
* */
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ProfileStatisticsFragment extends Fragment {
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestProfileStats() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_GET_USERSTATS, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -96,11 +96,12 @@ public class ProfileStatisticsFragment extends Fragment {
|
||||
JSONObject jObj = new JSONObject(response);
|
||||
boolean error = jObj.getBoolean("error");
|
||||
if (!error) {
|
||||
jObj = jObj.getJSONObject("msg");
|
||||
points.setText(jObj.getString("points"));
|
||||
ranking.setText(jObj.getString("rank"));
|
||||
posts.setText(jObj.getString("numberOfPosts"));
|
||||
txtMemberSince.setText(jObj.getString("created_at"));
|
||||
|
||||
JSONObject subJObj = jObj.getJSONObject("msg");
|
||||
points.setText(subJObj.getString("points"));
|
||||
ranking.setText(subJObj.getString("rank"));
|
||||
txtMemberSince.setText(subJObj.getString("created_at"));
|
||||
|
||||
JSONArray jSubs = jObj.getJSONArray("subs");
|
||||
|
||||
@@ -158,7 +159,6 @@ public class ProfileStatisticsFragment extends Fragment {
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_GET_USERSTATS);
|
||||
params.put("uid", parent.user.get(SessionManager.KEY_UID));
|
||||
params.put("token", parent.user.get(SessionManager.TOKEN));
|
||||
params.put("userstatsid", uid);
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ReportListFragment extends Fragment{
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestGetIncidentsWithPositionFromUserID() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_GET_INCIDENTS_FROMUSERID, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -136,7 +136,6 @@ public class ReportListFragment extends Fragment{
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_GET_INCIDENTS_FROMUSERID);
|
||||
params.put("uid", parent.user.get(SessionManager.KEY_UID));
|
||||
params.put("token", parent.user.get(SessionManager.TOKEN));
|
||||
params.put("userincidentid", uid);
|
||||
|
||||
@@ -25,12 +25,10 @@ import org.deke.risk.riskahead.adapter.SpinnerHintAdapter;
|
||||
*
|
||||
*/
|
||||
public class ReportWF_1_Fragment extends BaseReportWFFragment{
|
||||
private final static int VIOLANCE_GENERAL = 1;
|
||||
private final static int VIOLANCE_VERBAL = 2;
|
||||
private final static int VIOLANCE_LIGHT = 3;
|
||||
private final static int VIOLANCE_HARD = 4;
|
||||
private final static int VIOLANCE_NATURE = 5;
|
||||
private final static int VIOLANCE_INFRASTRUCTURE = 6;
|
||||
private final static int VIOLANCE_THREAT = 1;
|
||||
private final static int VIOLANCE_PHYSICAL = 2;
|
||||
private final static int VIOLANCE_LIFETHREAT = 3;
|
||||
private final static int VIOLANCE_DISASTER = 4;
|
||||
|
||||
private View viewFragment;
|
||||
|
||||
@@ -89,25 +87,19 @@ public class ReportWF_1_Fragment extends BaseReportWFFragment{
|
||||
|
||||
switch (position) {
|
||||
case 1:
|
||||
stringId = R.array.cat_situation_sub_general;
|
||||
stringId = R.array.cat_situation_sub_threat;
|
||||
break;
|
||||
case 2:
|
||||
stringId = R.array.cat_situation_sub_verbal;
|
||||
stringId = R.array.cat_situation_sub_physical;
|
||||
break;
|
||||
case 3:
|
||||
stringId = R.array.cat_situation_sub_force;
|
||||
stringId = R.array.cat_situation_sub_lifethreat;
|
||||
break;
|
||||
case 4:
|
||||
stringId = R.array.cat_situation_sub_force_serious;
|
||||
break;
|
||||
case 5:
|
||||
stringId = R.array.cat_situation_sub_nature;
|
||||
break;
|
||||
case 6:
|
||||
stringId = R.array.cat_situation_sub_infrastructure;
|
||||
stringId = R.array.cat_situation_sub_disaster;
|
||||
break;
|
||||
default:
|
||||
stringId = R.array.cat_situation_sub_general;
|
||||
stringId = R.array.cat_situation_sub_threat;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -120,9 +112,6 @@ public class ReportWF_1_Fragment extends BaseReportWFFragment{
|
||||
|
||||
checkIfFinished();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,6 +6,9 @@ import android.support.v4.app.DialogFragment;
|
||||
import android.app.TimePickerDialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.text.format.DateFormat;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -46,19 +49,22 @@ public class ReportWF_2_Fragment extends BaseReportWFFragment {
|
||||
private Spinner timeCategory;
|
||||
private Spinner timeSubCategory;
|
||||
|
||||
private EditText inputTimeFrom;
|
||||
private EditText inputDateFrom;
|
||||
private EditText inputTimeTo;
|
||||
private EditText inputDateTo;
|
||||
private static EditText inputTimeFrom;
|
||||
private static EditText inputDateFrom;
|
||||
private static EditText inputTimeTo;
|
||||
private static EditText inputDateTo;
|
||||
|
||||
private EditText tmpInput;
|
||||
private static EditText tmpInput;
|
||||
|
||||
private IncidentReport incident;
|
||||
|
||||
private OnInputFinishedListener mCallback;
|
||||
|
||||
private boolean tmpIsToDate = false;
|
||||
private boolean tmpIsToTime = false;
|
||||
public static boolean tmpIsToDate = false;
|
||||
public static boolean tmpIsToTime = false;
|
||||
|
||||
private DialogFragment timePickerFragment;
|
||||
private DialogFragment datePickerFragment;
|
||||
|
||||
public interface OnInputFinishedListener {
|
||||
void onInputFinished(boolean finished);
|
||||
@@ -194,6 +200,22 @@ public class ReportWF_2_Fragment extends BaseReportWFFragment {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
tmpInput = inputDateFrom;
|
||||
tmpInput.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
checkIfFinished();
|
||||
}
|
||||
});
|
||||
showDatePickerDialog();
|
||||
}
|
||||
});
|
||||
@@ -202,6 +224,22 @@ public class ReportWF_2_Fragment extends BaseReportWFFragment {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
tmpInput = inputTimeFrom;
|
||||
tmpInput.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
checkIfFinished();
|
||||
}
|
||||
});
|
||||
showTimePickerDialog();
|
||||
}
|
||||
});
|
||||
@@ -233,7 +271,7 @@ public class ReportWF_2_Fragment extends BaseReportWFFragment {
|
||||
});
|
||||
}
|
||||
|
||||
public class TimePickerFragment extends DialogFragment implements TimePickerDialog.OnTimeSetListener {
|
||||
public static class TimePickerFragment extends DialogFragment implements TimePickerDialog.OnTimeSetListener {
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
@@ -247,17 +285,22 @@ public class ReportWF_2_Fragment extends BaseReportWFFragment {
|
||||
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
|
||||
tmpInput.setText(String.format("%02d:%02d",hourOfDay,minute));
|
||||
|
||||
checkIfFinished();
|
||||
//checkIfFinished();
|
||||
}
|
||||
}
|
||||
|
||||
public void showTimePickerDialog() {
|
||||
DialogFragment newFragment = new TimePickerFragment();
|
||||
FragmentManager fm = getFragmentManager();
|
||||
timePickerFragment = (TimePickerFragment) fm.findFragmentByTag("Pick Time");
|
||||
|
||||
newFragment.show(getActivity().getSupportFragmentManager(), "Pick Time");
|
||||
if(timePickerFragment == null){
|
||||
timePickerFragment = new TimePickerFragment();
|
||||
}
|
||||
|
||||
timePickerFragment.show(fm, "Pick Time");
|
||||
}
|
||||
|
||||
public class DatePickerFragment extends DialogFragment implements DatePickerDialog.OnDateSetListener {
|
||||
public static class DatePickerFragment extends DialogFragment implements DatePickerDialog.OnDateSetListener {
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
@@ -286,13 +329,20 @@ public class ReportWF_2_Fragment extends BaseReportWFFragment {
|
||||
public void onDateSet(DatePicker view, int year, int month, int day) {
|
||||
tmpInput.setText(String.format("%04d-%02d-%02d",year,month + 1,day));
|
||||
|
||||
checkIfFinished();
|
||||
//checkIfFinished();
|
||||
}
|
||||
}
|
||||
|
||||
public void showDatePickerDialog() {
|
||||
DialogFragment newFragment = new DatePickerFragment();
|
||||
newFragment.show(getActivity().getSupportFragmentManager(), "Pick Date");
|
||||
|
||||
FragmentManager fm = getFragmentManager();
|
||||
datePickerFragment = (DatePickerFragment) fm.findFragmentByTag("Pick Date");
|
||||
|
||||
if(datePickerFragment == null){
|
||||
datePickerFragment = new DatePickerFragment();
|
||||
}
|
||||
|
||||
datePickerFragment.show(fm, "Pick Date");
|
||||
}
|
||||
|
||||
private void checkIfFinished(){
|
||||
@@ -361,6 +411,25 @@ public class ReportWF_2_Fragment extends BaseReportWFFragment {
|
||||
checkIfFinished();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
//invalidate the DialogFragment to avoid stupid memory leak
|
||||
if (timePickerFragment != null) {
|
||||
if (timePickerFragment.isVisible()) {
|
||||
timePickerFragment.dismiss();
|
||||
}
|
||||
timePickerFragment = null;
|
||||
}
|
||||
|
||||
if (datePickerFragment != null) {
|
||||
if (datePickerFragment.isVisible()) {
|
||||
datePickerFragment.dismiss();
|
||||
}
|
||||
datePickerFragment = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
|
||||
@@ -128,7 +128,9 @@ public class SettingsFragment extends PreferenceFragment {
|
||||
prefLocation.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
if (session.getLocation().longitude != 0.0 && session.getLocation().latitude != 0.0) {
|
||||
if (session.getManualLocation().longitude != 0.0 && session.getManualLocation().latitude != 0.0) {
|
||||
((SettingsActivity) getActivity()).getNotifyLocationFromMapActivity(Double.toString(session.getManualLocation().latitude) + " : " + Double.toString(session.getManualLocation().longitude));
|
||||
} else if(session.getLocation().longitude != 0.0 && session.getLocation().latitude != 0.0){
|
||||
((SettingsActivity) getActivity()).getNotifyLocationFromMapActivity(Double.toString(session.getLocation().latitude) + " : " + Double.toString(session.getLocation().longitude));
|
||||
} else {
|
||||
((SettingsActivity) getActivity()).getNotifyLocationFromMapActivity();
|
||||
@@ -218,7 +220,7 @@ public class SettingsFragment extends PreferenceFragment {
|
||||
prefRadius.setValue(Integer.toString(session.getNotificationRadius()));
|
||||
prefRadius.setSummary(prefRadius.getEntry());
|
||||
prefGPSENabled.setChecked(session.isGPSForNotificationsEnabled());
|
||||
prefLocation.setSummary(getResources().getString(R.string.txt_settings_gps_loca_sum)+":\n"+Double.toString(session.getLocation().latitude)+" : "+Double.toString(session.getLocation().longitude));
|
||||
prefLocation.setSummary(getResources().getString(R.string.txt_settings_gps_loca_sum)+":\n"+Double.toString(session.getManualLocation().latitude)+" : "+Double.toString(session.getManualLocation().longitude));
|
||||
|
||||
if(session.getSubsPremium()){
|
||||
if(session.isGPSForNotificationsEnabled()){
|
||||
@@ -239,7 +241,7 @@ public class SettingsFragment extends PreferenceFragment {
|
||||
|
||||
private StringRequest getStringRequestResetPW(final String email) {
|
||||
((SettingsActivity) getActivity()).showDialog();
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_REQUESTPWRESET, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -275,7 +277,6 @@ public class SettingsFragment extends PreferenceFragment {
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_REQUESTPWRESET);
|
||||
params.put("email", email);
|
||||
|
||||
return params;
|
||||
@@ -304,7 +305,7 @@ public class SettingsFragment extends PreferenceFragment {
|
||||
}
|
||||
|
||||
private StringRequest getStringChangeUserSettings(final String username, final String name, final String surname, final String email) {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_UPDATE_USER, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -364,7 +365,6 @@ public class SettingsFragment extends PreferenceFragment {
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_UPDATE_USER);
|
||||
params.put("uid", user.get(SessionManager.KEY_UID));
|
||||
params.put("token", user.get(SessionManager.TOKEN));
|
||||
params.put("username", username);
|
||||
|
||||
@@ -79,7 +79,7 @@ public class Top10Fragment extends Fragment {
|
||||
|
||||
|
||||
private StringRequest getStringRequestTop10() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_GET_TOP10, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -129,7 +129,6 @@ public class Top10Fragment extends Fragment {
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_GET_TOP10);
|
||||
params.put("uid", parent.user.get(SessionManager.KEY_UID));
|
||||
params.put("token", parent.user.get(SessionManager.TOKEN));
|
||||
|
||||
|
||||
@@ -87,8 +87,8 @@ public class TwitterButtonFragment extends Fragment {
|
||||
|
||||
@Override
|
||||
public void failure(TwitterException exception) {
|
||||
Log.e("Debug", "onFailure wird ausgeführt");
|
||||
showMessage("Twitter Login failed with exception " + exception.getMessage());
|
||||
Log.e("Twitter", "onFailure wird ausgeführt: "+exception);
|
||||
showMessage("Could not log in with Twitter. Please use E-Mail instead or try again later.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,13 +11,11 @@ public class AppConfig {
|
||||
/** GENERAL **/
|
||||
public final static String APP_PNAME = "org.deke.risk.riskahead";
|
||||
|
||||
|
||||
/** URLs **/
|
||||
public final static String URL_ENCRYPTED = "https://www.riskahead.de/helper/rest/";
|
||||
public final static String URL_DEFAULT = "http://www.riskahead.de/helper/rest/";
|
||||
public final static String URL_ENCRYPTED = "https://www.riskahead.de/api/v1";
|
||||
|
||||
public final static String URL_ABOUT = "http://www.riskahead.de/en/about/";
|
||||
public final static String URL_CONTACT = "http://www.riskahead.de/en/contact/";
|
||||
public final static String URL_ABOUT = "https://www.riskahead.net/about/";
|
||||
public final static String URL_CONTACT = "https://www.riskahead.net/contact/";
|
||||
|
||||
/** INTENT MESSAGES **/
|
||||
public final static String EXTRA_MESSAGE = "org.deke.risk.riskahead.MESSAGE";
|
||||
@@ -39,27 +37,45 @@ public class AppConfig {
|
||||
public final static int VOTETYPE_DOWNVOTE = 2;
|
||||
|
||||
/** REST WEBSERVICE **/
|
||||
public final static String REST_LOGIN = "login";
|
||||
public final static String REST_LOGIN_SOCIAL = "sociallogin";
|
||||
public final static String REST_LOGIN_EXISTS= "checkifuserexists";
|
||||
public final static String REST_REGISTER = "register";
|
||||
public final static String REST_RESENDACTIVATIONMAIL = "resendactivationusermail";
|
||||
public final static String REST_REQUESTPWRESET = "requestpwreset";
|
||||
public final static String REST_GET_NUMOFINCIDENTS = "getincidentcount";
|
||||
public final static String REST_GET_INCIDENTS_FROMBOUND = "getincidentsfrombound";
|
||||
public final static String REST_GET_INCIDENTS_FROMBOUND_FORHEATMAP = "getincidentsforheatmapfrombound";
|
||||
public final static String REST_GET_INCIDENTS_FROMUSERID = "getincidentsfromuserid";
|
||||
public final static String REST_GET_INCIDENTS_FROMINCIDENTID = "getincidentfromincidentid";
|
||||
public final static String REST_ADD_INCIDENT_WITHPOSITION = "addincidentwithposition";
|
||||
public final static String REST_UPDATE_USER = "updateuser";
|
||||
public final static String REST_GET_USERSTATS = "getuserstats";
|
||||
public final static String REST_GET_INCIDENTS_FROMAREATIME = "getincidentsinareaandtime";
|
||||
public final static String REST_GET_TOP10 = "gettop10";
|
||||
public final static String REST_ADD_VOTE = "addvote";
|
||||
public final static String REST_DELETE_VOTE = "deletevote";
|
||||
public final static String REST_SEND_FEEDBACK = "sendfeedback";
|
||||
public final static String REST_DEACTIVATE_INCIDENT = "deactivateincident";
|
||||
public final static String ROUTE_PUB = "/public";
|
||||
public final static String ROUTE_AUTH = "/auth";
|
||||
|
||||
public static final String REST_CHECK_MAINTENANCE = "checkformaintenance";
|
||||
public static final String REST_CHECK_VERSION= "checkifversionvalid";
|
||||
public final static String ROUTE_GROUP_USERS = "/users";
|
||||
public final static String ROUTE_GROUP_SOCIALMEDIAS = "/socialmedias";
|
||||
public final static String ROUTE_GROUP_VALIDATIONS = "/validations";
|
||||
public final static String ROUTE_GROUP_INCIDENTS = "/incidents";
|
||||
public final static String ROUTE_GROUP_SUBSCRIPTIONS = "/subscriptions";
|
||||
public final static String ROUTE_GROUP_VOTES = "/votes";
|
||||
|
||||
public final static String REST_LOGIN = URL_ENCRYPTED + ROUTE_PUB + ROUTE_GROUP_USERS + "/login/";
|
||||
public final static String REST_REGISTER = URL_ENCRYPTED + ROUTE_PUB + ROUTE_GROUP_USERS + "/register/";
|
||||
public final static String REST_USEREXISTS = URL_ENCRYPTED + ROUTE_PUB + ROUTE_GROUP_USERS + "/exists/";
|
||||
public final static String REST_LOGIN_SOCIAL = URL_ENCRYPTED + ROUTE_PUB + ROUTE_GROUP_SOCIALMEDIAS + "/login/";
|
||||
|
||||
public final static String REST_SENDACTIVATIONMAIL = URL_ENCRYPTED + ROUTE_PUB + ROUTE_GROUP_USERS + "/sendactivation/";
|
||||
public final static String REST_REQUESTPWRESET = URL_ENCRYPTED + ROUTE_PUB + ROUTE_GROUP_USERS + "/sendpwreset/";
|
||||
|
||||
public final static String REST_GET_NUMOFINCIDENTS = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_INCIDENTS + "/get/number/";
|
||||
public final static String REST_GET_INCIDENT = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_INCIDENTS + "/get/incidentid/";
|
||||
public final static String REST_GET_INCIDENTS_FROMUSERID = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_INCIDENTS + "/get/userid/";
|
||||
public final static String REST_GET_INCIDENTS_FROMBOUND = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_INCIDENTS + "/get/activefrombound/";
|
||||
public final static String REST_GET_INCIDENTS_FROMBOUND_FORHEATMAP = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_INCIDENTS + "/get/activefromboundreduced/";
|
||||
public final static String REST_GET_INCIDENTS_FROMAREATIME = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_INCIDENTS + "/get/boundandtime/";
|
||||
|
||||
public final static String REST_DEACTIVATE_INCIDENT = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_INCIDENTS + "/deactivate/";
|
||||
public final static String REST_ADD_INCIDENT_WITHPOSITION = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_INCIDENTS + "/add/withposition/";
|
||||
|
||||
public final static String REST_UPDATE_USER = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_USERS + "/update/";
|
||||
public final static String REST_GET_USERSTATS = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_USERS + "/statistics/";
|
||||
public final static String REST_GET_TOP10 = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_USERS + "/top10/";
|
||||
public final static String REST_SEND_FEEDBACK = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_USERS + "/feedback/";
|
||||
public final static String REST_GET_SUBSCRIPTIONS = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_USERS + ROUTE_GROUP_SUBSCRIPTIONS + "/";
|
||||
public final static String REST_ADD_SUBSCRIPTIONS = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_USERS + ROUTE_GROUP_SUBSCRIPTIONS + "/add/";
|
||||
public final static String REST_DEACTIVATE_SUBSCRIPTIONS = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_USERS + ROUTE_GROUP_SUBSCRIPTIONS + "/deactivate/";
|
||||
|
||||
public final static String REST_ADD_VOTE = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_USERS + ROUTE_GROUP_VOTES + "/add/";
|
||||
public final static String REST_DELETE_VOTE = URL_ENCRYPTED + ROUTE_AUTH + ROUTE_GROUP_USERS + ROUTE_GROUP_VOTES + "/delete/";
|
||||
|
||||
public static final String REST_CHECK_MAINTENANCE = URL_ENCRYPTED + ROUTE_PUB + ROUTE_GROUP_VALIDATIONS + "/maintenance/";
|
||||
public static final String REST_CHECK_VERSION = URL_ENCRYPTED + ROUTE_PUB + ROUTE_GROUP_VALIDATIONS + "/version/";
|
||||
}
|
||||
|
||||
@@ -56,7 +56,6 @@ import com.mikepenz.materialdrawer.model.ProfileDrawerItem;
|
||||
import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem;
|
||||
|
||||
import org.deke.risk.riskahead.LoginActivity;
|
||||
import org.deke.risk.riskahead.MainActivity;
|
||||
import org.deke.risk.riskahead.MapsActivity;
|
||||
import org.deke.risk.riskahead.R;
|
||||
import org.deke.risk.riskahead.ProfileActivity;
|
||||
@@ -72,11 +71,9 @@ import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* (C) Copyright 2016 RiskAhead (http://www.riskahead.net)
|
||||
* Developer & Contributor: Dennis Thießen (dennis.thiessen@riskahead.net)
|
||||
* Date of Release: 10.02.2016
|
||||
*
|
||||
*/
|
||||
public abstract class BaseActivity extends AppCompatActivity {
|
||||
|
||||
@@ -107,14 +104,14 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
|
||||
int onStartCount = 0;
|
||||
|
||||
public void userHasToBeLoggedIn(){
|
||||
public void userHasToBeLoggedIn() {
|
||||
if (!session.isLoggedIn()) {
|
||||
logout();
|
||||
}
|
||||
isNetworkAvailable();
|
||||
}
|
||||
|
||||
public HashMap<String, String> getUser(){
|
||||
public HashMap<String, String> getUser() {
|
||||
user = session.getUserDetails();
|
||||
return user;
|
||||
}
|
||||
@@ -138,14 +135,11 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
|
||||
|
||||
onStartCount = 1;
|
||||
if (savedInstanceState == null)
|
||||
{
|
||||
if (savedInstanceState == null) {
|
||||
this.overridePendingTransition(R.anim.slide_in_left,
|
||||
R.anim.slide_out_left);
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
onStartCount = 2;
|
||||
}
|
||||
|
||||
@@ -157,22 +151,15 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
session = new SessionManager(getApplicationContext());
|
||||
user = session.getUserDetails();
|
||||
|
||||
Log.d(TAG,user.get(SessionManager.KEY_UID));
|
||||
Log.d(TAG, user.get(SessionManager.KEY_UID));
|
||||
|
||||
mToolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(mToolbar);
|
||||
initNavigationDrawer(savedInstanceState);
|
||||
|
||||
|
||||
|
||||
if(!isMyNotificationServiceRunning() && session.getNotificationEnabled()){
|
||||
|
||||
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.ACCESS_COARSE_LOCATION},1);
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d(TAG,"onCreate: NotificationService not running. Starting service...");
|
||||
if (!isMyNotificationServiceRunning()) {
|
||||
Log.d(TAG, "onCreate: NotificationService not running. Starting service...");
|
||||
|
||||
Intent wtdSServiceIntent = new Intent(this, NotificationService.class);
|
||||
PendingIntent wtdSServicePendingIntent = PendingIntent.getService(this, 0, wtdSServiceIntent, 0);
|
||||
@@ -183,13 +170,12 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
AlarmManager am = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
|
||||
|
||||
am.setInexactRepeating(AlarmManager.RTC, firstStart, interval,
|
||||
wtdSServicePendingIntent);
|
||||
wtdSServicePendingIntent);
|
||||
|
||||
Log.d(TAG, "AlarmManager set");
|
||||
|
||||
startService(new Intent(this, NotificationService.class));
|
||||
}else{
|
||||
Log.d(TAG,"onCreate: NotificationService already running. Not starting more services.");
|
||||
} else {
|
||||
Log.d(TAG, "onCreate: NotificationService already running. Not starting more services.");
|
||||
}
|
||||
|
||||
AppRater.app_launched(BaseActivity.this);
|
||||
@@ -204,30 +190,29 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy(){
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
unregisterBroadcastReceiver();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume(){
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
registerBroadcastReceiver();
|
||||
|
||||
}
|
||||
|
||||
public void registerBroadcastReceiver(){
|
||||
public void registerBroadcastReceiver() {
|
||||
IntentFilter intentFilter = new IntentFilter();
|
||||
intentFilter.addAction(AppConfig.INTENT_LOGOUT);
|
||||
myReceiver = new LogoutReceiver();
|
||||
registerReceiver(myReceiver, intentFilter);
|
||||
}
|
||||
|
||||
public void unregisterBroadcastReceiver(){
|
||||
try{
|
||||
public void unregisterBroadcastReceiver() {
|
||||
try {
|
||||
unregisterReceiver(myReceiver);
|
||||
}catch(final Exception e){
|
||||
} catch (final Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -254,11 +239,6 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
private void initNavigationDrawer(Bundle savedInstanceState) {
|
||||
PrimaryDrawerItem item1 = new PrimaryDrawerItem()
|
||||
.withName(R.string.navigation_start)
|
||||
.withIdentifier(mainAvtivityID)
|
||||
.withIcon(GoogleMaterial.Icon.gmd_home);
|
||||
|
||||
PrimaryDrawerItem item2 = new PrimaryDrawerItem()
|
||||
.withName(R.string.navigation_report)
|
||||
.withIdentifier(reportAvtivityID)
|
||||
@@ -311,7 +291,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onDrawerClosed(View drawerView) {
|
||||
android.support.v7.app.ActionBar actionBar = getSupportActionBar();
|
||||
if(actionBar != null) actionBar.setTitle(getActivityName());
|
||||
if (actionBar != null) actionBar.setTitle(getActivityName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -322,7 +302,6 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
.withSavedInstance(savedInstanceState)
|
||||
.withSelectedItem(-1)
|
||||
.addDrawerItems(
|
||||
item1,
|
||||
item2,
|
||||
item3,
|
||||
new DividerDrawerItem(),
|
||||
@@ -331,41 +310,37 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
new DividerDrawerItem(),
|
||||
item6,
|
||||
item7).withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {
|
||||
@Override
|
||||
public boolean onItemClick(View view, int position, IDrawerItem drawerItem) {
|
||||
@Override
|
||||
public boolean onItemClick(View view, int position, IDrawerItem drawerItem) {
|
||||
|
||||
|
||||
switch (drawerItem.getIdentifier()) {
|
||||
case 1:
|
||||
gotoMainActivity();
|
||||
return false;
|
||||
case 2:
|
||||
gotoReportActivity();
|
||||
return false;
|
||||
case 3:
|
||||
gotoMapActivity();
|
||||
return false;
|
||||
case 4:
|
||||
gotoProfileActivity();
|
||||
return false;
|
||||
case 5:
|
||||
gotoSettingsActivity();
|
||||
return false;
|
||||
case 6:
|
||||
gotoSubscriptionsActivity();
|
||||
return false;
|
||||
case 7:
|
||||
logoutUser();
|
||||
break;
|
||||
default:
|
||||
Log.d("Unknown switch page: ", Integer.toString(position));
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}).build();
|
||||
switch ((int) drawerItem.getIdentifier()) {
|
||||
case 2:
|
||||
gotoReportActivity();
|
||||
return false;
|
||||
case 3:
|
||||
gotoMapActivity();
|
||||
return false;
|
||||
case 4:
|
||||
gotoProfileActivity();
|
||||
return false;
|
||||
case 5:
|
||||
gotoSettingsActivity();
|
||||
return false;
|
||||
case 6:
|
||||
gotoSubscriptionsActivity();
|
||||
return false;
|
||||
case 7:
|
||||
logoutUser();
|
||||
break;
|
||||
default:
|
||||
Log.d("Unknown switch page: ", Integer.toString(position));
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}).build();
|
||||
|
||||
|
||||
}
|
||||
@@ -376,25 +351,23 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
mInterstitialAd.loadAd(adRequest);
|
||||
}
|
||||
|
||||
public void showAd(){
|
||||
if(System.currentTimeMillis() == 0) session.setLastAddShown(System.currentTimeMillis());
|
||||
public void showAd() {
|
||||
if (session.getLastAddShown() == 0) session.setLastAddShown(System.currentTimeMillis());
|
||||
|
||||
if(System.currentTimeMillis() > session.getLastAddShown()+120000){
|
||||
if (System.currentTimeMillis() > (session.getLastAddShown() + 120000)) {
|
||||
Log.d(TAG, "SHOW ADD!");
|
||||
if (mInterstitialAd.isLoaded()) {
|
||||
Log.d(TAG, "Loading Add...");
|
||||
if(!(session.getSubsNoAds() || session.getSubsPremium())){
|
||||
|
||||
if (mInterstitialAd.isLoaded()) {
|
||||
Log.d(TAG, "Loading Add...");
|
||||
if (!(session.getSubsNoAds() || session.getSubsPremium())) {
|
||||
|
||||
mInterstitialAd.show();
|
||||
session.setLastAddShown(System.currentTimeMillis());
|
||||
|
||||
|
||||
}else{
|
||||
Log.d(TAG,"Add not shown because user has status.");
|
||||
} else {
|
||||
Log.d(TAG, "Add not shown because user has status.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
Log.d(TAG, "SHOW NO ADD ( TIME NOT OUT ) !");
|
||||
}
|
||||
}
|
||||
@@ -403,7 +376,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
|
||||
ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
|
||||
if(activeNetworkInfo == null){
|
||||
if (activeNetworkInfo == null) {
|
||||
new AlertDialog.Builder(this)
|
||||
.setTitle(getString(R.string.alert_internetconnection_title))
|
||||
.setMessage(getString(R.string.alert_internetconnection_text))
|
||||
@@ -451,19 +424,13 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void gotoMainActivity(){
|
||||
Intent intent;
|
||||
intent = new Intent(getApplicationContext(), MainActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void gotoReportActivity(){
|
||||
public void gotoReportActivity() {
|
||||
Intent intent;
|
||||
intent = new Intent(getApplicationContext(), ReportWFActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void gotoReportActivity(String position){
|
||||
public void gotoReportActivity(String position) {
|
||||
Intent intent;
|
||||
intent = new Intent(getApplicationContext(), ReportWFActivity.class);
|
||||
intent.putExtra(EXTRA_MESSAGE, position);
|
||||
@@ -471,34 +438,34 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
finish();
|
||||
}
|
||||
|
||||
public void gotoMapActivity(){
|
||||
public void gotoMapActivity() {
|
||||
Intent intent;
|
||||
intent = new Intent(BaseActivity.this, MapsActivity.class);
|
||||
BaseActivity.this.startActivity(intent);
|
||||
}
|
||||
|
||||
public void gotoMapActivity(String position){
|
||||
public void gotoMapActivity(String position) {
|
||||
Intent intent;
|
||||
intent = new Intent(getApplicationContext(), MapsActivity.class);
|
||||
intent.putExtra(EXTRA_MESSAGE, position);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void getNotifyLocationFromMapActivity(){
|
||||
public void getNotifyLocationFromMapActivity() {
|
||||
Intent intent;
|
||||
intent = new Intent(getApplicationContext(), MapsActivity.class);
|
||||
intent.putExtra(AppConfig.EXTRA_MAP_TYPE, AppConfig.INTENT_MAP_GETNOTIFY);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void getIncidentLocationFromMapActivity(){
|
||||
public void getIncidentLocationFromMapActivity() {
|
||||
Intent intent;
|
||||
intent = new Intent(getApplicationContext(), MapsActivity.class);
|
||||
intent.putExtra(AppConfig.EXTRA_MAP_TYPE, AppConfig.INTENT_MAP_GETINCLOC);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void getNotifyLocationFromMapActivity(String position){
|
||||
public void getNotifyLocationFromMapActivity(String position) {
|
||||
Intent intent;
|
||||
intent = new Intent(getApplicationContext(), MapsActivity.class);
|
||||
intent.putExtra(EXTRA_MESSAGE, position);
|
||||
@@ -506,7 +473,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void getIncidentLocationFromMapActivity(String position){
|
||||
public void getIncidentLocationFromMapActivity(String position) {
|
||||
Intent intent;
|
||||
intent = new Intent(getApplicationContext(), MapsActivity.class);
|
||||
intent.putExtra(EXTRA_MESSAGE, position);
|
||||
@@ -514,32 +481,32 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void gotoProfileActivity(){
|
||||
public void gotoProfileActivity() {
|
||||
Intent intent;
|
||||
intent = new Intent(getApplicationContext(), ProfileActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void gotoProfileActivity(String uid){
|
||||
public void gotoProfileActivity(String uid) {
|
||||
Intent intent;
|
||||
intent = new Intent(getApplicationContext(), ProfileActivity.class);
|
||||
intent.putExtra(EXTRA_MESSAGE, uid);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void gotoSettingsActivity(){
|
||||
public void gotoSettingsActivity() {
|
||||
Intent intent;
|
||||
intent = new Intent(getApplicationContext(), SettingsActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void gotoSubscriptionsActivity(){
|
||||
public void gotoSubscriptionsActivity() {
|
||||
Intent intent;
|
||||
intent = new Intent(getApplicationContext(), SubscriptionsActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void gotoViewReportActivity(Integer uid){
|
||||
public void gotoViewReportActivity(Integer uid) {
|
||||
Intent intent;
|
||||
intent = new Intent(getApplicationContext(), ViewReportActivity.class);
|
||||
intent.putExtra(EXTRA_MESSAGE, uid);
|
||||
@@ -550,36 +517,36 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
|
||||
if((id == R.id.menu_action_exit)){
|
||||
if ((id == R.id.menu_action_exit)) {
|
||||
Intent intent = new Intent(Intent.ACTION_MAIN);
|
||||
intent.addCategory(Intent.CATEGORY_HOME);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
}else if((id == R.id.menu_action_about)){
|
||||
} else if ((id == R.id.menu_action_about)) {
|
||||
showAboutInfoDialog();
|
||||
}else if((id == R.id.menu_action_language)){
|
||||
} else if ((id == R.id.menu_action_language)) {
|
||||
showLanguageDialog();
|
||||
}else if((id == R.id.menu_action_help)){
|
||||
} else if ((id == R.id.menu_action_help)) {
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.riskahead.net/contact/"));
|
||||
startActivity(browserIntent);
|
||||
}else if((id == R.id.menu_action_feedback)){
|
||||
} else if ((id == R.id.menu_action_feedback)) {
|
||||
showFeedbackDialog();
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
private void showLanguageDialog(){
|
||||
private void showLanguageDialog() {
|
||||
AlertDialog.Builder b = new AlertDialog.Builder(this);
|
||||
b.setTitle(R.string.txt_language_title);
|
||||
String[] types = {"ar - العربية", "de - Deutsch", "en - English", "es - Español", "et - Eesti keel", "fi - Suomi", "fr - Français", "lv - Latviešu valoda", "mn - Монгол хэл", "nl - Nederlands", "pl - Polszczyzna", "pt - Português do Brasil", "ru - Pусский", "tr - Türkçe"};
|
||||
String[] types = {"ar - العربية", "de - Deutsch", "en - English", "es - Español", "et - Eesti keel", "fi - Suomi", "fr - Français", "lv - Latviešu valoda", "mn - Монгол хэл", "nl - Nederlands", "pl - Polszczyzna", "pt - Português do Brasil", "ru - Pусский", "tr - Türkçe"};
|
||||
b.setItems(types, new DialogInterface.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
||||
dialog.dismiss();
|
||||
switch(which){
|
||||
switch (which) {
|
||||
case 0:
|
||||
setLocale("ar");
|
||||
break;
|
||||
@@ -651,12 +618,12 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
((TextView) dialoglayout.findViewById(R.id.txt_about_terms)).setMovementMethod(LinkMovementMethod.getInstance());
|
||||
|
||||
try {
|
||||
((TextView) dialoglayout.findViewById(R.id.lbl_about_version)).setText(String.format("Version: %s",getPackageManager().getPackageInfo(getPackageName(), 0).versionName));
|
||||
((TextView) dialoglayout.findViewById(R.id.lbl_about_version)).setText(String.format("Version: %s", getPackageManager().getPackageInfo(getPackageName(), 0).versionName));
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(BaseActivity.this)
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(BaseActivity.this)
|
||||
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
//do nothing
|
||||
@@ -668,7 +635,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
private void showFeedbackDialog() {
|
||||
AlertDialog.Builder alert=new AlertDialog.Builder(this);
|
||||
AlertDialog.Builder alert = new AlertDialog.Builder(this);
|
||||
alert.setTitle(R.string.menu_action_feedback);
|
||||
alert.setMessage(R.string.txt_feedback_message);
|
||||
|
||||
@@ -680,7 +647,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
|
||||
input.setLayoutParams(lp);
|
||||
input.setLines(4);
|
||||
input.setBackgroundColor(ContextCompat.getColor(getApplicationContext(),R.color.bootstrap_gray_lightest));
|
||||
input.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.bootstrap_gray_lightest));
|
||||
input.setGravity(Gravity.TOP);
|
||||
input.setHint(R.string.txt_feedback_hint);
|
||||
|
||||
@@ -702,7 +669,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
});
|
||||
|
||||
AlertDialog ad = alert.create();
|
||||
ad.setView(input,0,50,0,20);
|
||||
ad.setView(input, 0, 50, 0, 20);
|
||||
ad.show();
|
||||
}
|
||||
|
||||
@@ -713,17 +680,17 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
while (e.hasMoreElements()) {
|
||||
String k = (String) e.nextElement();
|
||||
String v = props.getProperty(k);
|
||||
sysprop += k+": "+v+"\n";
|
||||
sysprop += k + ": " + v + "\n";
|
||||
}
|
||||
|
||||
|
||||
StringRequest strReq = getStringRequestSendFeedback(feedback,sysprop);
|
||||
StringRequest strReq = getStringRequestSendFeedback(feedback, sysprop);
|
||||
String tag_string_req = "reqsendfeedback";
|
||||
AppController.getInstance().addToRequestQueue(strReq, tag_string_req);
|
||||
}
|
||||
|
||||
private StringRequest getStringRequestSendFeedback(final String feedback, final String sysprop) {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_SEND_FEEDBACK, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -755,7 +722,6 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_SEND_FEEDBACK);
|
||||
params.put("uid", user.get(SessionManager.KEY_UID));
|
||||
params.put("token", user.get(SessionManager.TOKEN));
|
||||
params.put("feedback", feedback);
|
||||
@@ -765,7 +731,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
};
|
||||
}
|
||||
|
||||
public void showMessage(String statusText){
|
||||
public void showMessage(String statusText) {
|
||||
Toast.makeText(this, statusText, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
@@ -812,5 +778,4 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -315,32 +315,22 @@ public class IncidentReport implements ClusterItem {
|
||||
|
||||
switch(this.fidIncidentCategory){
|
||||
case 1:
|
||||
stringArray = context.getResources().getStringArray(R.array.cat_situation_sub_general);
|
||||
stringArray = context.getResources().getStringArray(R.array.cat_situation_sub_threat);
|
||||
returnValue = stringArray[this.fidIncidentSubCategory-1];
|
||||
|
||||
break;
|
||||
case 2:
|
||||
stringArray = context.getResources().getStringArray(R.array.cat_situation_sub_verbal);
|
||||
stringArray = context.getResources().getStringArray(R.array.cat_situation_sub_physical);
|
||||
returnValue = stringArray[this.fidIncidentSubCategory-1];
|
||||
|
||||
break;
|
||||
case 3:
|
||||
stringArray = context.getResources().getStringArray(R.array.cat_situation_sub_force);
|
||||
stringArray = context.getResources().getStringArray(R.array.cat_situation_sub_lifethreat);
|
||||
returnValue = stringArray[this.fidIncidentSubCategory-1];
|
||||
|
||||
break;
|
||||
case 4:
|
||||
stringArray = context.getResources().getStringArray(R.array.cat_situation_sub_force_serious);
|
||||
returnValue = stringArray[this.fidIncidentSubCategory-1];
|
||||
|
||||
break;
|
||||
case 5:
|
||||
stringArray = context.getResources().getStringArray(R.array.cat_situation_sub_nature);
|
||||
returnValue = stringArray[this.fidIncidentSubCategory-1];
|
||||
|
||||
break;
|
||||
case 6:
|
||||
stringArray = context.getResources().getStringArray(R.array.cat_situation_sub_infrastructure);
|
||||
stringArray = context.getResources().getStringArray(R.array.cat_situation_sub_disaster);
|
||||
returnValue = stringArray[this.fidIncidentSubCategory-1];
|
||||
|
||||
break;
|
||||
@@ -612,6 +602,16 @@ public class IncidentReport implements ClusterItem {
|
||||
return this.incidentPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return "Title";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSnippet() {
|
||||
return "Snippet";
|
||||
}
|
||||
|
||||
public int getVotedScore(){
|
||||
return this.votedScore;
|
||||
}
|
||||
|
||||
@@ -49,10 +49,18 @@ public class NotificationService extends Service {
|
||||
Handler mNotifyHandler = new Handler();
|
||||
NotificationManager mNotificationManager;
|
||||
|
||||
private static final int MIN_DISTANCE_CHANGE_FOR_UPDATES = 10; // 10 meters
|
||||
private static final int MIN_TIME_BW_UPDATES = 1000 * 60; // 1 minute
|
||||
private static int gpscounter = 0;
|
||||
|
||||
public SessionManager session;
|
||||
|
||||
public HashMap<String, String> user;
|
||||
|
||||
public LocationManager locationManager;
|
||||
private LocationManager locationManager;
|
||||
private LocationListener locationListener;
|
||||
|
||||
private LatLng myPosition;
|
||||
|
||||
public NotificationService() {
|
||||
super();
|
||||
@@ -60,51 +68,87 @@ public class NotificationService extends Service {
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
Log.d(TAG, "onCreate NotificationService");
|
||||
|
||||
mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
session = new SessionManager(getApplicationContext());
|
||||
user = session.getUserDetails();
|
||||
|
||||
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
|
||||
LocationListener locationListener = new MyLocationListener();
|
||||
|
||||
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
//ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.ACCESS_COARSE_LOCATION},1);
|
||||
}else{
|
||||
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 5000, 10, locationListener);
|
||||
}
|
||||
|
||||
|
||||
Log.d(TAG, "Service Created. Starting notification task...");
|
||||
Log.d(TAG, "NotificationService created. Starting notification task...");
|
||||
mNotifyTask.run();
|
||||
}
|
||||
|
||||
private class MyLocationListener implements LocationListener {
|
||||
private void initAndGetPosition() {
|
||||
Log.d(TAG,"Trying to get a position. GPS enabled: "+session.isGPSForNotificationsEnabled());
|
||||
if(session.isGPSForNotificationsEnabled()) {
|
||||
|
||||
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
|
||||
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
|
||||
locationListener = new MyLocationListener();
|
||||
|
||||
if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
|
||||
Log.d(TAG, "Locationservice enabled - GPS Provider Found");
|
||||
|
||||
locationManager.requestLocationUpdates(
|
||||
LocationManager.GPS_PROVIDER,
|
||||
MIN_TIME_BW_UPDATES,
|
||||
MIN_DISTANCE_CHANGE_FOR_UPDATES, locationListener);
|
||||
Log.d(TAG, "GPS Provider enabled");
|
||||
|
||||
if (locationManager != null) {
|
||||
Location tmpLocation = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
|
||||
if (tmpLocation != null) {
|
||||
Log.d(TAG,"Last known position found from GPS Provider");
|
||||
removeLocationListener();
|
||||
session.setLocation(Double.doubleToRawLongBits(tmpLocation.getLatitude()), Double.doubleToRawLongBits(tmpLocation.getLongitude()));
|
||||
myPosition = session.getLocation();
|
||||
session.setNotificationServiceReady(true);
|
||||
}
|
||||
}
|
||||
} else if (locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)) {
|
||||
// get location from Network Provider
|
||||
Log.d(TAG, "Locationservice enabled - Network Provider Found");
|
||||
locationManager.requestLocationUpdates(
|
||||
LocationManager.NETWORK_PROVIDER,
|
||||
MIN_TIME_BW_UPDATES,
|
||||
MIN_DISTANCE_CHANGE_FOR_UPDATES, locationListener);
|
||||
Log.d(TAG, "Network Provider enabled");
|
||||
if (locationManager != null) {
|
||||
Location tmpLocation = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
|
||||
if (tmpLocation != null) {
|
||||
Log.d(TAG,"Last known position found from Network Provider");
|
||||
removeLocationListener();
|
||||
session.setLocation(Double.doubleToRawLongBits(tmpLocation.getLatitude()), Double.doubleToRawLongBits(tmpLocation.getLongitude()));
|
||||
myPosition = session.getLocation();
|
||||
session.setNotificationServiceReady(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
myPosition = session.getManualLocation();
|
||||
}
|
||||
}
|
||||
|
||||
private void removeLocationListener() {
|
||||
if(locationManager != null && locationListener != null){
|
||||
locationManager.removeUpdates(locationListener);
|
||||
locationListener = null;
|
||||
locationManager = null;
|
||||
}
|
||||
}
|
||||
|
||||
private class MyLocationListener implements LocationListener {
|
||||
@Override
|
||||
public void onLocationChanged(Location loc) {
|
||||
String longitude = "Longitude: " + loc.getLongitude();
|
||||
Log.v(TAG, longitude);
|
||||
String latitude = "Latitude: " + loc.getLatitude();
|
||||
Log.v(TAG, latitude);
|
||||
Log.d(TAG,"onLocationChanged: "+gpscounter);
|
||||
session.setLocation(Double.doubleToRawLongBits(loc.getLatitude()), Double.doubleToRawLongBits(loc.getLongitude()));
|
||||
session.setNotificationServiceReady(true);
|
||||
|
||||
if(session.isGPSForNotificationsEnabled() && loc.getLongitude() != 0.0 && loc.getLatitude() != 0.0) {
|
||||
Log.d(TAG, "Save GPS as new location...");
|
||||
if(session.getLocation() == null || session.getLocation().latitude == 0.0 || session.getLocation().longitude == 0.0){
|
||||
session.setLocation(Double.doubleToRawLongBits(loc.getLatitude()), Double.doubleToRawLongBits(loc.getLongitude()));
|
||||
mNotifyHandler.removeCallbacksAndMessages(null);
|
||||
mNotifyTask.run();
|
||||
}else{
|
||||
session.setLocation(Double.doubleToRawLongBits(loc.getLatitude()), Double.doubleToRawLongBits(loc.getLongitude()));
|
||||
}
|
||||
|
||||
session.setNotificationServiceReady(true);
|
||||
|
||||
}else{
|
||||
Log.d(TAG,"Don't Save GPS as new location because GPS for notifications is disabled...: "+session.isGPSForNotificationsEnabled());
|
||||
if(gpscounter > 3){
|
||||
removeLocationListener();
|
||||
}
|
||||
|
||||
gpscounter++;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -127,14 +171,15 @@ public class NotificationService extends Service {
|
||||
public void run() {
|
||||
android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND);
|
||||
|
||||
LatLng myPosition = session.getLocation();
|
||||
boolean notifyEnabled = session.getNotificationEnabled();
|
||||
int radius = session.getNotificationRadius();
|
||||
int pollFrequency = session.getNotificationPollFreq() * 1000 * 60;
|
||||
boolean notifyEnabled = session.getNotificationEnabled();
|
||||
|
||||
Log.d(this.toString(), "Run Notification Task. Notifications enabled = " + notifyEnabled);
|
||||
|
||||
if(notifyEnabled && session.isLoggedIn()){
|
||||
initAndGetPosition();
|
||||
|
||||
if ((myPosition != null) && (myPosition.latitude != 0.0) && (myPosition.longitude != 0.0)) {
|
||||
session.setNotificationServiceReady(true);
|
||||
String lastNotificationTime;
|
||||
@@ -145,7 +190,7 @@ public class NotificationService extends Service {
|
||||
lastNotificationTime = session.getLastNotification();
|
||||
}
|
||||
|
||||
Log.d(this.toString(), "Lookup location with position: " + myPosition + " Radius: "+ radius +" PollFrequency: "+ pollFrequency +" lastNotifyTime: " + lastNotificationTime);
|
||||
Log.d(this.toString(), "Lookup location with position: " + myPosition + " Radius: "+ radius +" PollFrequency: "+ pollFrequency +" lastNotifyTime: " + lastNotificationTime + " GPSActivated: "+session.isGPSForNotificationsEnabled());
|
||||
|
||||
StringRequest strReq = getStringRequestIncidentsFromAreaAndTime(myPosition.latitude, myPosition.longitude, radius, lastNotificationTime);
|
||||
String tag_string_req = "req_incidents";
|
||||
@@ -162,7 +207,7 @@ public class NotificationService extends Service {
|
||||
};
|
||||
|
||||
private StringRequest getStringRequestIncidentsFromAreaAndTime(final Double latitude, final Double longitude, final int radius, final String time) {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.URL_DEFAULT, new Response.Listener<String>() {
|
||||
return new StringRequest(Request.Method.POST, AppConfig.REST_GET_INCIDENTS_FROMAREATIME, new Response.Listener<String>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
@@ -196,7 +241,6 @@ public class NotificationService extends Service {
|
||||
@Override
|
||||
protected Map<String, String> getParams() {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("tag", AppConfig.REST_GET_INCIDENTS_FROMAREATIME);
|
||||
params.put("uid", user.get(SessionManager.KEY_UID));
|
||||
params.put("token", user.get(SessionManager.TOKEN));
|
||||
params.put("latitude", Double.toString(latitude));
|
||||
@@ -246,18 +290,16 @@ public class NotificationService extends Service {
|
||||
);
|
||||
mBuilder.setContentIntent(resultPendingIntent);
|
||||
|
||||
int mId = 1;
|
||||
mNotificationManager.notify(mId, mBuilder.build());
|
||||
|
||||
mNotificationManager.notify(1, mBuilder.build());
|
||||
session.setLastNotification(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime()));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy(){
|
||||
if(locationManager != null && locationListener != null) locationManager.removeUpdates(locationListener);
|
||||
|
||||
super.onDestroy();
|
||||
|
||||
Log.d(TAG, "Destroy NotificationService");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -49,6 +49,9 @@ public class SessionManager {
|
||||
public static final String KEY_LOCATION_LAT = "location_latitude";
|
||||
public static final String KEY_LOCATION_LNG = "location_longitude";
|
||||
|
||||
public static final String KEY_MAN_LOCATION_LAT = "man_location_latitude";
|
||||
public static final String KEY_MAN_LOCATION_LNG = "man_location_longitude";
|
||||
|
||||
public static final String KEY_LAST_NOTIFICATION = "lastNotificationTime";
|
||||
public static final String KEY_NOTIFY_ENABLED = "notifyEnabled" ;
|
||||
public static final String KEY_NOTIFY_RADIUS = "notifyRadius";
|
||||
@@ -88,6 +91,16 @@ public class SessionManager {
|
||||
return new LatLng(Double.longBitsToDouble(status.getLong(KEY_LOCATION_LAT, 0)), Double.longBitsToDouble(status.getLong(KEY_LOCATION_LNG, 0)));
|
||||
}
|
||||
|
||||
public void setManualLocation(Long latitude, Long longitude){
|
||||
statusEditor.putLong(KEY_MAN_LOCATION_LAT, latitude);
|
||||
statusEditor.putLong(KEY_MAN_LOCATION_LNG, longitude);
|
||||
statusEditor.apply();
|
||||
}
|
||||
|
||||
public LatLng getManualLocation(){
|
||||
return new LatLng(Double.longBitsToDouble(status.getLong(KEY_MAN_LOCATION_LAT, 0)), Double.longBitsToDouble(status.getLong(KEY_MAN_LOCATION_LNG, 0)));
|
||||
}
|
||||
|
||||
public void setGPSForNotificationsEnabled(boolean isEnabled){
|
||||
statusEditor.putBoolean(KEY_NOTIFY_GPS, isEnabled);
|
||||
statusEditor.apply();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.deke.risk.riskahead.helper;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.design.widget.TextInputLayout;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.widget.TextView;
|
||||
@@ -14,12 +15,14 @@ import android.widget.TextView;
|
||||
*/
|
||||
public abstract class TextValidator implements TextWatcher {
|
||||
private final TextView textView;
|
||||
private final TextInputLayout textLayout;
|
||||
|
||||
public TextValidator(TextView textView, Context context) {
|
||||
public TextValidator(TextView textView, TextInputLayout textLayout, Context context) {
|
||||
this.textView = textView;
|
||||
this.textLayout = textLayout;
|
||||
}
|
||||
|
||||
public abstract void validate(TextView textView, String text);
|
||||
public abstract void validate(TextView textView, TextInputLayout textLayout, String text);
|
||||
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
@@ -33,6 +36,6 @@ public abstract class TextValidator implements TextWatcher {
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
String text = textView.getText().toString();
|
||||
validate(textView, text);
|
||||
validate(textView, textLayout, text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.preference.EditTextPreference;
|
||||
import android.app.AlertDialog;
|
||||
import android.support.design.widget.TextInputLayout;
|
||||
import android.text.Editable;
|
||||
import android.text.InputType;
|
||||
import android.text.TextWatcher;
|
||||
@@ -12,6 +13,7 @@ import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.util.Patterns;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import org.deke.risk.riskahead.R;
|
||||
|
||||
@@ -62,7 +64,11 @@ public class ValidatedEditTextPreference extends EditTextPreference
|
||||
|
||||
if((getEditText().getInputType() & InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS) != 0){
|
||||
if (!Patterns.EMAIL_ADDRESS.matcher(value).matches()) {
|
||||
getEditText().setError(getEditText().getContext().getResources().getString(R.string.error_email));
|
||||
if(getEditText().getParent().getClass() == TextInputLayout.class){
|
||||
((TextInputLayout) getEditText().getParent()).setError(getEditText().getContext().getResources().getString(R.string.error_email));
|
||||
}else{
|
||||
getEditText().setError(getEditText().getContext().getResources().getString(R.string.error_email));
|
||||
}
|
||||
enable = false;
|
||||
}
|
||||
}else{
|
||||
@@ -81,7 +87,6 @@ public class ValidatedEditTextPreference extends EditTextPreference
|
||||
|
||||
Dialog dlg = getDialog();
|
||||
|
||||
|
||||
if(dlg instanceof AlertDialog){
|
||||
AlertDialog alertDlg = (AlertDialog)dlg;
|
||||
Button btn = alertDlg.getButton(AlertDialog.BUTTON_POSITIVE);
|
||||
@@ -89,7 +94,6 @@ public class ValidatedEditTextPreference extends EditTextPreference
|
||||
Log.d("SettingValidator", "btnSetEnable durchgeführt: "+btn.isEnabled());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,126 +1,158 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/bg_login"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp"
|
||||
tools:context=".LoginActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_login_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="54dp"
|
||||
android:background="@color/bg_common"
|
||||
android:textColor="@color/md_white_1000"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="@string/lbl_login_title"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:typeface="sans" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_register_email"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/lbl_login_title"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@color/white"
|
||||
android:hint="@string/input_register_email_hint"
|
||||
android:inputType="textEmailAddress"
|
||||
android:padding="10dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/input_login"
|
||||
android:textColorHint="@color/input_login_hint" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_register_password"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_below="@+id/input_register_email"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@color/white"
|
||||
android:hint="@string/input_register_password_hint"
|
||||
android:inputType="textPassword"
|
||||
android:padding="10dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/input_login"
|
||||
android:textColorHint="@color/input_login_hint" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_login"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@+id/input_register_password"
|
||||
android:layout_marginBottom="10dip"
|
||||
android:layout_marginTop="20dip"
|
||||
android:background="@color/btn_login_bg"
|
||||
android:minWidth="120dp"
|
||||
android:text="@string/btn_start_login"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_below="@+id/btn_login"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content">
|
||||
android:text="@string/lbl_login_title"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/lbl_login_title"
|
||||
android:paddingLeft="15dp"
|
||||
android:paddingRight="15dp"
|
||||
android:paddingBottom="20dp">
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/input_layout_email"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_register_email"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/input_register_email_hint"
|
||||
android:inputType="textEmailAddress"
|
||||
android:padding="10dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/input_login"
|
||||
android:textColorHint="@color/input_login_hint" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/input_layout_password"
|
||||
android:layout_below="@+id/input_layout_email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_register_password"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:hint="@string/input_register_password_hint"
|
||||
android:inputType="textPassword"
|
||||
android:padding="10dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/input_login"
|
||||
android:textColorHint="@color/input_login_hint" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||
android:id="@+id/btn_login"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_below="@+id/input_layout_password"
|
||||
android:layout_marginBottom="5dip"
|
||||
android:layout_marginTop="20dip"
|
||||
bootstrap:bootstrapText="@string/btn_start_login"
|
||||
bootstrap:bootstrapBrand="primary"
|
||||
bootstrap:roundedCorners="true" />
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||
android:id="@+id/btn_switchtoregistration"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_below="@+id/btn_login"
|
||||
android:layout_marginBottom="5dip"
|
||||
bootstrap:bootstrapText="@string/btn_start_register"
|
||||
bootstrap:bootstrapBrand="primary"
|
||||
bootstrap:roundedCorners="true" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_below="@+id/btn_switchtoregistration"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/linearLayout3">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_login_resendPW"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lbl_login_resendPW"
|
||||
android:textColor="@color/bg_common"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_login_resendPW"
|
||||
android:id="@+id/lbl_login_usesocialnet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lbl_login_resendPW"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
</LinearLayout>
|
||||
android:layout_above="@+id/lay_social"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:textColor="@color/bg_common"
|
||||
android:text="@string/lbl_login_usesocialnet" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lay_social"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/frag_login_btnGP"
|
||||
android:name="org.deke.risk.riskahead.fragment.GooglePlusButtonFragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_margin="1dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout="@layout/fragment_googleplus_button" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/frag_login_btnTW"
|
||||
android:name="org.deke.risk.riskahead.fragment.TwitterButtonFragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_margin="1dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout="@layout/fragment_twitter_button" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/frag_login_btnFB"
|
||||
android:name="org.deke.risk.riskahead.fragment.FacebookButtonFragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_margin="1dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout="@layout/fragment_facebook_button" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_login_usesocialnet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/frag_login_btnGP"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="@string/lbl_login_usesocialnet" />
|
||||
|
||||
|
||||
<fragment
|
||||
android:id="@+id/frag_login_btnGP"
|
||||
android:name="org.deke.risk.riskahead.fragment.GooglePlusButtonFragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/frag_login_btnTW"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="5dp"
|
||||
tools:layout="@layout/fragment_googleplus_button" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/frag_login_btnTW"
|
||||
android:name="org.deke.risk.riskahead.fragment.TwitterButtonFragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/frag_login_btnFB"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="5dp"
|
||||
tools:layout="@layout/fragment_twitter_button" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/frag_login_btnFB"
|
||||
android:name="org.deke.risk.riskahead.fragment.FacebookButtonFragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
tools:layout="@layout/fragment_facebook_button" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<include
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/layout_toolbar"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:contentDescription="@null"
|
||||
android:id="@+id/imageView"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/layoutContent"
|
||||
android:layout_below="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="30dp"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:background="@color/main_button"
|
||||
android:id="@+id/linearLayout">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_profile_points"
|
||||
android:text="@string/lbl_main_txt1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="@color/white"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_main_incidents"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="38dp"
|
||||
android:textSize="40sp"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_profile_numberposts"
|
||||
android:text="@string/lbl_main_txt2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:layout_marginTop="34dp"
|
||||
android:textColor="@color/white"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutNotifications"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_above="@+id/layoutFooter">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_main_notifystatus"
|
||||
android:text="@string/txt_notifystatus_txt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/white"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_main_notifystatus_status"
|
||||
android:text="AUS"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/white"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutFooter"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_main_report"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginRight="1dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="80dp"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:text="@string/btn_main_reportinc" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_main_viewmap"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_weight="1"
|
||||
android:paddingRight="10dp"
|
||||
android:textColor="@color/white"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="80dp"
|
||||
android:text="@string/btn_main_showmap" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,17 +8,8 @@
|
||||
android:layout_height="match_parent"
|
||||
tools:context="org.deke.risk.riskahead.MapsActivity">
|
||||
|
||||
<include
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/layout_toolbar"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/layoutContent"
|
||||
android:layout_below="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
@@ -49,7 +40,15 @@
|
||||
android:id="@+id/pb_map_progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true" />
|
||||
android:layout_alignParentBottom="true" />
|
||||
|
||||
<include
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/layout_toolbar_trans"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main_layout"
|
||||
android:background="@drawable/layout_bg_gradient"
|
||||
android:background="@color/bg_report"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ProfileActivity">
|
||||
@@ -11,7 +11,7 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/layout_toolbar"
|
||||
layout="@layout/layout_toolbar_col"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
@@ -26,15 +26,6 @@
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/logo_380"
|
||||
android:id="@+id/imageView2"
|
||||
android:alpha="0.05"
|
||||
android:layout_gravity="center_horizontal"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -1,130 +1,156 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/bg_register"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp"
|
||||
tools:context=".LoginActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_register_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="54dp"
|
||||
android:background="@color/bg_common"
|
||||
android:textColor="@color/md_white_1000"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:text="@string/lbl_register_title"
|
||||
android:textColor="@color/input_register"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:typeface="sans" />
|
||||
android:textSize="20sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_register_name"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/lbl_register_title"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@color/input_register_bg"
|
||||
android:hint="@string/input_register_name_hint"
|
||||
android:inputType="textCapWords"
|
||||
android:padding="10dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/input_register"
|
||||
android:textColorHint="@color/input_register_hint" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_register_email"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/input_register_name"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@color/input_register_bg"
|
||||
android:hint="@string/input_register_email_hint"
|
||||
android:inputType="textEmailAddress"
|
||||
android:padding="10dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/input_register"
|
||||
android:textColorHint="@color/input_register_hint" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_register_password"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/input_register_email"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@color/input_register_bg"
|
||||
android:hint="@string/input_register_password_hint"
|
||||
android:inputType="textPassword"
|
||||
android:padding="10dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/input_register"
|
||||
android:textColorHint="@color/input_register_hint" />
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@+id/input_register_password"
|
||||
android:orientation="horizontal"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/lbl_register_title"
|
||||
android:paddingLeft="15dp"
|
||||
android:paddingRight="15dp"
|
||||
android:paddingBottom="20dp">
|
||||
|
||||
<Button
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/input_layout_username"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_register_name"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/input_register_name_hint"
|
||||
android:inputType="textCapWords"
|
||||
android:padding="10dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/input_login"
|
||||
android:textColorHint="@color/input_login_hint" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/input_layout_email"
|
||||
android:layout_below="@+id/input_layout_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_register_email"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/input_register_email_hint"
|
||||
android:inputType="textEmailAddress"
|
||||
android:padding="10dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/input_login"
|
||||
android:textColorHint="@color/input_login_hint" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/input_layout_password"
|
||||
android:layout_below="@+id/input_layout_email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_register_password"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/input_register_password_hint"
|
||||
android:inputType="textPassword"
|
||||
android:padding="10dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/input_login"
|
||||
android:textColorHint="@color/input_login_hint" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||
android:id="@+id/btn_register"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight=".4"
|
||||
android:background="#ffea7f8a"
|
||||
android:minWidth="120dp"
|
||||
android:text="@string/btn_start_register"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_below="@id/input_layout_password"
|
||||
android:layout_marginBottom="5dip"
|
||||
android:layout_marginTop="20dip"
|
||||
bootstrap:bootstrapText="@string/btn_start_register"
|
||||
bootstrap:bootstrapBrand="primary"
|
||||
bootstrap:roundedCorners="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_register_switchtologin"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/bg_common"
|
||||
android:textAlignment="center"
|
||||
android:text="@string/txt_register_switchtologin"
|
||||
android:layout_below="@+id/btn_register"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_login_usesocialnet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/frag_login_btnGP"
|
||||
android:layout_above="@+id/lay_social"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="@string/lbl_login_usesocialnet"
|
||||
android:textColor="@color/input_register" />
|
||||
android:textColor="@color/bg_common"
|
||||
android:text="@string/lbl_login_usesocialnet" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/frag_login_btnGP"
|
||||
android:name="org.deke.risk.riskahead.fragment.GooglePlusButtonFragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/frag_login_btnTW"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="5dp"
|
||||
tools:layout="@layout/fragment_googleplus_button" />
|
||||
<LinearLayout
|
||||
android:id="@+id/lay_social"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/frag_login_btnTW"
|
||||
android:name="org.deke.risk.riskahead.fragment.TwitterButtonFragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/frag_login_btnFB"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="5dp"
|
||||
tools:layout="@layout/fragment_twitter_button" />
|
||||
<fragment
|
||||
android:id="@+id/frag_login_btnGP"
|
||||
android:name="org.deke.risk.riskahead.fragment.GooglePlusButtonFragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_margin="1dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout="@layout/fragment_googleplus_button" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/frag_login_btnFB"
|
||||
android:name="org.deke.risk.riskahead.fragment.FacebookButtonFragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
tools:layout="@layout/fragment_facebook_button" />
|
||||
<fragment
|
||||
android:id="@+id/frag_login_btnTW"
|
||||
android:name="org.deke.risk.riskahead.fragment.TwitterButtonFragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_margin="1dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout="@layout/fragment_twitter_button" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/frag_login_btnFB"
|
||||
android:name="org.deke.risk.riskahead.fragment.FacebookButtonFragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_margin="1dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout="@layout/fragment_facebook_button" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
android:id="@+id/main_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/layout_bg_gradient"
|
||||
android:background="@color/bg_report"
|
||||
tools:context=".ReportWFActivity">
|
||||
|
||||
<include
|
||||
android:id="@+id/toolbar"
|
||||
layout="@layout/layout_toolbar"
|
||||
layout="@layout/layout_toolbar_col"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
@@ -30,15 +30,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/logo_380"
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_margin="5dp"
|
||||
android:alpha="0.05"
|
||||
android:layout_gravity="center_horizontal"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main_layout"
|
||||
android:background="@drawable/layout_bg_gradient"
|
||||
android:background="@color/bg_report"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".SettingsActivity">
|
||||
@@ -11,7 +11,7 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/layout_toolbar"
|
||||
layout="@layout/layout_toolbar_col"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
@@ -22,16 +22,6 @@
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_below="@id/toolbar">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/logo_380"
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_margin="5dp"
|
||||
android:alpha="0.05"
|
||||
android:layout_gravity="center_horizontal"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,48 +0,0 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
tools:context="org.deke.risk.riskahead.StartActivity"
|
||||
android:background="#ffffff">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_start_logo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/logo_riskahead"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="#00ffffff"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutFooter"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_start_login"
|
||||
android:text="@string/btn_start_login"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:onClick="gotoLogin" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_start_register"
|
||||
android:text="@string/btn_start_register"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:onClick="gotoRegister" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -2,7 +2,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main_layout"
|
||||
android:background="@drawable/layout_bg_gradient"
|
||||
android:background="@color/bg_report"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".SubscriptionsActivity">
|
||||
@@ -11,7 +11,7 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/layout_toolbar"
|
||||
layout="@layout/layout_toolbar_col"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
android:id="@+id/layoutMain"
|
||||
android:layout_below="@+id/toolbar"
|
||||
android:layout_margin="0dp"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -30,7 +31,6 @@
|
||||
android:text="@string/lbl_subs_maintaining"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_margin="5dp"/>
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
android:text="@string/lbl_subs_helpus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:layout_margin="5dp"
|
||||
android:textColor="@color/text_light_grey"/>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/layout_toolbar"
|
||||
layout="@layout/layout_toolbar_col"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||
android:id="@+id/btn_login_fb"
|
||||
android:layout_width="225dp"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="50dp"
|
||||
bootstrap:bootstrapText="{fa_facebook_f} Facebook"
|
||||
bootstrap:bootstrapBrand="primary"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||
android:id="@+id/btn_login_gp"
|
||||
android:layout_width="225dp"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="50dp"
|
||||
bootstrap:bootstrapText="{fa_google} Google+"
|
||||
bootstrap:bootstrapBrand="danger"
|
||||
|
||||
@@ -73,16 +73,13 @@
|
||||
android:textColor="@color/bg_common" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="100dp"
|
||||
android:background="@drawable/layout_bg"
|
||||
android:hint="@string/hint_place"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:id="@+id/lbl_reportwf_position_detail"
|
||||
android:layout_below="@+id/lbl_reportwf_1_question_2"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginBottom="50dp"/>
|
||||
android:layout_below="@+id/lbl_reportwf_1_question_2"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||
android:id="@+id/btn_login_twitter"
|
||||
android:layout_width="225dp"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="50dp"
|
||||
bootstrap:bootstrapText="{fa_twitter} Twitter"
|
||||
bootstrap:bootstrapBrand="info"
|
||||
|
||||
12
app/src/main/res/layout/layout_toolbar_col.xml
Normal file
12
app/src/main/res/layout/layout_toolbar_col.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.Toolbar xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
||||
android:background="@color/bg_common"
|
||||
/>
|
||||
|
||||
|
||||
@@ -3,11 +3,8 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/MyRiskAheadToolbar"
|
||||
app:popupTheme="@style/Theme.AppCompat.Light.NoActionBar"
|
||||
android:elevation="4dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto" />
|
||||
android:background="@color/translucent"
|
||||
/>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<item android:id="@+id/menu_btn_gotostart"
|
||||
android:icon="@android:drawable/ic_menu_revert"
|
||||
android:icon="@android:drawable/ic_input_delete"
|
||||
app:showAsAction="always"
|
||||
android:title="@string/lbl_reportwf_newreport" />
|
||||
|
||||
|
||||
@@ -246,70 +246,50 @@
|
||||
<string name="txt_language_title">غيِر اللغه</string>
|
||||
|
||||
<string-array name="cat_situation_main">
|
||||
<item> حادثه او وضع مهدد</item>
|
||||
<item>عنف كلامي</item>
|
||||
<item>بوادر لعنف جسدي كبير</item>
|
||||
<item>عنف يهدد الحياه</item>
|
||||
<item>كارثه طبيعيه</item>
|
||||
<item>كارثه بشريه & بنيه تحتيه</item>
|
||||
<item>Threat</item>
|
||||
<item>Physical</item>
|
||||
<item>Life-Threatening</item>
|
||||
<item>Disaster</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_general">
|
||||
<item>تزوير,سرقه,سطو</item>
|
||||
<item>استعمال المخدرات بشكل مفرطك شرب الكحول</item>
|
||||
<item>مظاهرات,اعمال شغب,حصار طريق</item>
|
||||
<item>نقاط تفتيش ومعابر رقابه</item>
|
||||
<item>فساد,ابتزاز</item>
|
||||
<item>أجرام, اعمال ميليشيات وارهابيين</item>
|
||||
<item>غيره …</item>
|
||||
<string-array name="cat_situation_sub_threat">
|
||||
<item>Robbery</item>
|
||||
<item>Drug related</item>
|
||||
<item>Strike/Riot</item>
|
||||
<item>Checkpoint/Blockade</item>
|
||||
<item>Corruption/Extorsion</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_verbal">
|
||||
<item>تحرش جنسي</item>
|
||||
<item>لغه مهينه او مهدده</item>
|
||||
<item>استجواب,ضغط,ارغام</item>
|
||||
<item>تحريض,دفع</item>
|
||||
<item>غيره …</item>
|
||||
<string-array name="cat_situation_sub_physical">
|
||||
<item>Mugging</item>
|
||||
<item>Sexual Assault</item>
|
||||
<item>Physical Attack</item>
|
||||
<item>Fight</item>
|
||||
<item>Arrest/Capture</item>
|
||||
<item>Forced Labour</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force">
|
||||
<item>اعتداء جنسي</item>
|
||||
<item>اعتداء جسدي بشكل عام</item>
|
||||
<item>شجار او عراك</item>
|
||||
<item>اعتقال او قبض </item>
|
||||
<item>عمل مرغوم وبالاجبار</item>
|
||||
<item>غيره …</item>
|
||||
<string-array name="cat_situation_sub_lifethreat">
|
||||
<item>Rape</item>
|
||||
<item>Kidnapping/Hostage</item>
|
||||
<item>Shooting</item>
|
||||
<item>Bombing</item>
|
||||
<item>Murder</item>
|
||||
<item>Dead body</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force_serious">
|
||||
<item>اغتصاب</item>
|
||||
<item>تعذيب,خطف,احتجاز رهائن</item>
|
||||
<item>اطلاق نار</item>
|
||||
<item>تفجير او عمل انتحاري</item>
|
||||
<item>قتل, اعدام علني</item>
|
||||
<item>عرض جثث او اجزاء جثث </item>
|
||||
<item>غيره …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_nature">
|
||||
<item>درجات حراره قصوى</item>
|
||||
<item>عاصفه,بركان,اعصار</item>
|
||||
<item>فيضانات,تسونامي</item>
|
||||
<item>زلزال, انهيارات ارضيه</item>
|
||||
<item>نيران,دخان,انفجار بركاني</item>
|
||||
<item>مجاعه,جفاف,طاعون حيواني </item>
|
||||
<item>غيره …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_infrastructure">
|
||||
<item>تلوث هوائي</item>
|
||||
<item>انقطاع التيار الكهربائي او حادث عام</item>
|
||||
<item>انهيار المباني او دمار</item>
|
||||
<item>حريق على نطاق واسع</item>
|
||||
<item>كارثه كيميائيه او انسكاب نفط</item>
|
||||
<item>تفشي مرض او وباء</item>
|
||||
<item>فوضي او فوضى سياسيه</item>
|
||||
<item>غيره …</item>
|
||||
<string-array name="cat_situation_sub_disaster">
|
||||
<item>Heat Wave</item>
|
||||
<item>Cyclone/Tornado</item>
|
||||
<item>Flood</item>
|
||||
<item>Earthquake</item>
|
||||
<item>Wild Fire</item>
|
||||
<item>Volcano</item>
|
||||
<item>Tsunami</item>
|
||||
<item>Fire</item>
|
||||
<item>Chemical/Oil Spill</item>
|
||||
<item>Epidemic</item>
|
||||
<item>Chaos/Anarchy</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_time_main">
|
||||
@@ -441,4 +421,11 @@
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
</string-array>
|
||||
<string name="alert_notsupported_title">Please update now!</string>
|
||||
<string name="alert_notsupported_text">This version is not supported anymore because of important updates. Please update to a new version of RiskAhead by using your marketplace.</string>
|
||||
<string name="later">Later</string>
|
||||
<string name="alert_notrecommended_title">Please update soon!</string>
|
||||
<string name="alert_notrecommended_text">There is a new version available in your marketplace. We still support your version but it is recommended to perform an update. The support of your version will end soon.</string>
|
||||
<string name="txt_reportlist_deleted">Deleted</string>
|
||||
<string name="txt_register_switchtologin">Already have an account? Login here!</string>
|
||||
</resources>
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<string name="lbl_login_title">Anmeldung bei RiskAhead</string>
|
||||
<string name="lbl_login_resendPW">Passwort vergessen? Klicke hier</string>
|
||||
<string name="lbl_login_policy"><a href="http://www.riskahead.de/terms/">Impressum</a> und <a href="http://www.riskahead.de/privacy/">Datenschutz</a></string>
|
||||
<string name="lbl_login_policy"><a href="https://www.riskahead.de/terms/">Impressum</a> und <a href="https://www.riskahead.de/privacy/">Datenschutz</a></string>
|
||||
<string name="lbl_login_usesocialnet">Oder verwende folgende Netzwerke</string>
|
||||
|
||||
<string name="lbl_register_title">Registrierung bei RiskAhead</string>
|
||||
@@ -239,71 +239,52 @@
|
||||
<string name="txt_about_riskahead">RiskAhead für Android</string>
|
||||
<string name="menu_action_language">Sprache</string>
|
||||
<string name="txt_language_title">Ändere Sprache</string>
|
||||
|
||||
<string-array name="cat_situation_main">
|
||||
<item>Allgemeiner Vorfall/Situation</item>
|
||||
<item>Mündliche Gewalt</item>
|
||||
<item>Leichte / schwere körperliche Gewalt</item>
|
||||
<item>Vorfall</item>
|
||||
<item>Physische Bedrohung</item>
|
||||
<item>Lebensgefährliche Gewalt</item>
|
||||
<item>Naturkatastrophe</item>
|
||||
<item>Menschl. Katastrophe & Infrastruktur</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_general">
|
||||
<item>Diebstahl, Betrug, Einbruch</item>
|
||||
<item>Drogenmissbrauch z.B. Getränk</item>
|
||||
<item>Protest, Unruhe, Straßenblockade</item>
|
||||
<item>Checkpoint, Kontrollen</item>
|
||||
<item>Korruption, Erpressung</item>
|
||||
<item>Einfluss Kriminalität, Milizen, Terror</item>
|
||||
<item>Sonstiges …</item>
|
||||
<string-array name="cat_situation_sub_threat">
|
||||
<item>Überfall</item>
|
||||
<item>Drogenkriminalität</item>
|
||||
<item>Streik/Aufstand</item>
|
||||
<item>Checkpoint/Blockade</item>
|
||||
<item>Korruption/Missbrauch</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_verbal">
|
||||
<string-array name="cat_situation_sub_physical">
|
||||
<item>Raubüberfall</item>
|
||||
<item>Sexuelle Belästigung</item>
|
||||
<item>Beleidigung, Drohung</item>
|
||||
<item>Nötigung/Vernehmung</item>
|
||||
<item>Aufhetzung</item>
|
||||
<item>Sonstiges …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force">
|
||||
<item>Sexueller Übergriff</item>
|
||||
<item>Angriff auf Person allgemein</item>
|
||||
<item>Schlägerei</item>
|
||||
<item>Festnahme/Gefangennahme </item>
|
||||
<item>Physischer Angriff</item>
|
||||
<item>Kampf</item>
|
||||
<item>Arrest/Übernahme</item>
|
||||
<item>Zwangsarbeit</item>
|
||||
<item>Sonstiges …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force_serious">
|
||||
<string-array name="cat_situation_sub_lifethreat">
|
||||
<item>Vergewaltigung</item>
|
||||
<item>Folter, Entführung, Geiselnahme</item>
|
||||
<item>Geiselnahme</item>
|
||||
<item>Schießerei</item>
|
||||
<item>Explosion, Selbstmordattentat</item>
|
||||
<item>Mord, Tötung, Hinrichtung</item>
|
||||
<item>Leichenfund</item>
|
||||
<item>Sonstiges …</item>
|
||||
<item>Bombenangriff</item>
|
||||
<item>Mord</item>
|
||||
<item>Leiche</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_nature">
|
||||
<item>Temperaturextrem</item>
|
||||
<item>Wind, Sturm, Orkan, Tornado</item>
|
||||
<item>Überschwemmung/-flutung, Tsunami</item>
|
||||
<item>Erdbeben, Berghang Einsturz</item>
|
||||
<item>Feuer, Rauch, Vulkanausbruch</item>
|
||||
<item>Hungersnot, Tierplage</item>
|
||||
<item>Sonstiges …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_infrastructure">
|
||||
<item>Smog Stadt</item>
|
||||
<item>Stromausfall, Unfall</item>
|
||||
<item>Zerstörung, Einsturzgefahr Gebäude</item>
|
||||
<item>Brandkatastrophe</item>
|
||||
<item>Chemiekatastrophe, Ölpest</item>
|
||||
<item>Seuche, Krankheit</item>
|
||||
<item>Chaos Bevölkerung, Anarchie</item>
|
||||
<item>Sonstiges …</item>
|
||||
<string-array name="cat_situation_sub_disaster">
|
||||
<item>Hitzewelle</item>
|
||||
<item>Tornado</item>
|
||||
<item>Flut</item>
|
||||
<item>Erdbeben</item>
|
||||
<item>Wildfeuer</item>
|
||||
<item>Vulkanausbruch</item>
|
||||
<item>Tsunami</item>
|
||||
<item>Feuer</item>
|
||||
<item>Chemie-/Ölunfall</item>
|
||||
<item>Epidemie</item>
|
||||
<item>Chaos/Anarchie</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_time_main">
|
||||
@@ -436,14 +417,13 @@
|
||||
<item>60</item>
|
||||
</string-array>
|
||||
<string name="txt_errormsg_createincident">Vorfall konnte nicht gespeichert werden</string>
|
||||
<string name="update">Update</string>
|
||||
<string name="alert_notrecommended_text">Eine neue Version ist in deinem AppStore verfügbar. Wir unterstützen diese Version zwar noch, jedoch wird diese bald ablaufen. Bitte aktualisiere RiskAhead bald.</string>
|
||||
<string name="alert_notrecommended_title">Bitte bald aktualisieren!</string>
|
||||
<string name="alert_notsupported_text">Diese Version wird auf Grund wichtiger Updates nicht mehr unterstützt! Bitte aktualisiere RiskAhead um diese weiter verwenden zu können.</string>
|
||||
<string name="alert_notsupported_title">Bitte jetzt aktualisieren!</string>
|
||||
<string name="exit">Exit</string>
|
||||
<string name="later">Später</string>
|
||||
<string name="txt_reportlist_deleted">Gelöscht</string>
|
||||
<string name="txt_register_switchtologin">Already have an account? Login here!</string>
|
||||
|
||||
</resources>
|
||||
|
||||
|
||||
@@ -246,70 +246,50 @@
|
||||
<string name="txt_language_title">Cambiar Idioma</string>
|
||||
|
||||
<string-array name="cat_situation_main">
|
||||
<item>Situación o Incidente Peligroso</item>
|
||||
<item>Violencia Verbal</item>
|
||||
<item>Violencia Física Ligera o Grave</item>
|
||||
<item>Riesgo de Muerte por Violencia</item>
|
||||
<item>Catástrofe Natural</item>
|
||||
<item>Catástrofe Humana & Infraestructura</item>
|
||||
<item>Threat</item>
|
||||
<item>Physical</item>
|
||||
<item>Life-Threatening</item>
|
||||
<item>Disaster</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_general">
|
||||
<item>Estafa, Robo o Asalto</item>
|
||||
<item>Abuso de drogas y bebidas alteradas</item>
|
||||
<item>Manifestación, Motín o Camino bloqueado</item>
|
||||
<item>Punto de Control</item>
|
||||
<item>Corrupción, Extorsión</item>
|
||||
<item>Milicias, Terrorismo</item>
|
||||
<item>Otros …</item>
|
||||
<string-array name="cat_situation_sub_threat">
|
||||
<item>Robbery</item>
|
||||
<item>Drug related</item>
|
||||
<item>Strike/Riot</item>
|
||||
<item>Checkpoint/Blockade</item>
|
||||
<item>Corruption/Extorsion</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_verbal">
|
||||
<item>Acoso Sexual</item>
|
||||
<item>Insulto, Amenaza</item>
|
||||
<item>Interrogación/Coerción</item>
|
||||
<item>Incitamiento</item>
|
||||
<item>Otros …</item>
|
||||
<string-array name="cat_situation_sub_physical">
|
||||
<item>Mugging</item>
|
||||
<item>Sexual Assault</item>
|
||||
<item>Physical Attack</item>
|
||||
<item>Fight</item>
|
||||
<item>Arrest/Capture</item>
|
||||
<item>Forced Labour</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force">
|
||||
<item>Asalto Sexual</item>
|
||||
<item>Ataque Físico en general</item>
|
||||
<item>Riña, Pelea</item>
|
||||
<item>Arresto, Captura </item>
|
||||
<item>Trabajo Forzado</item>
|
||||
<item>Otros …</item>
|
||||
<string-array name="cat_situation_sub_lifethreat">
|
||||
<item>Rape</item>
|
||||
<item>Kidnapping/Hostage</item>
|
||||
<item>Shooting</item>
|
||||
<item>Bombing</item>
|
||||
<item>Murder</item>
|
||||
<item>Dead body</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force_serious">
|
||||
<item>Violación</item>
|
||||
<item>Tortura, Secuestro, Rehenes</item>
|
||||
<item>Disparos</item>
|
||||
<item>Bomba, Ataque Suicida</item>
|
||||
<item>Homicidio, Asesinato, Ejecución Pública</item>
|
||||
<item>Hallazgo de cádaveres</item>
|
||||
<item>Otros …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_nature">
|
||||
<item>Temperaturas Extremas</item>
|
||||
<item>Tormenta, Huracán, Tornado</item>
|
||||
<item>Inundación, Tsunami</item>
|
||||
<item>Seísmo, Terremoto</item>
|
||||
<item>Fuego, Humo, Erupción Volcánica</item>
|
||||
<item>Hambruna, Sequía, Plagua Animal </item>
|
||||
<item>Otros …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_infrastructure">
|
||||
<item>Polución Aérea</item>
|
||||
<item>Fallida Energética o Accidente General</item>
|
||||
<item>Derrumbamiento o Destrucción de Edificios</item>
|
||||
<item>Incendio</item>
|
||||
<item>Desastre Químico o Derrame de Petróleo</item>
|
||||
<item>Enfermedad, Brote o Epidemia</item>
|
||||
<item>Caos, Anarquía</item>
|
||||
<item>Otros …</item>
|
||||
<string-array name="cat_situation_sub_disaster">
|
||||
<item>Heat Wave</item>
|
||||
<item>Cyclone/Tornado</item>
|
||||
<item>Flood</item>
|
||||
<item>Earthquake</item>
|
||||
<item>Wild Fire</item>
|
||||
<item>Volcano</item>
|
||||
<item>Tsunami</item>
|
||||
<item>Fire</item>
|
||||
<item>Chemical/Oil Spill</item>
|
||||
<item>Epidemic</item>
|
||||
<item>Chaos/Anarchy</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_time_main">
|
||||
@@ -441,4 +421,11 @@
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
</string-array>
|
||||
<string name="alert_notsupported_title">Please update now!</string>
|
||||
<string name="alert_notsupported_text">This version is not supported anymore because of important updates. Please update to a new version of RiskAhead by using your marketplace.</string>
|
||||
<string name="later">Later</string>
|
||||
<string name="alert_notrecommended_title">Please update soon!</string>
|
||||
<string name="alert_notrecommended_text">There is a new version available in your marketplace. We still support your version but it is recommended to perform an update. The support of your version will end soon.</string>
|
||||
<string name="txt_reportlist_deleted">Deleted</string>
|
||||
<string name="txt_register_switchtologin">Already have an account? Login here!</string>
|
||||
</resources>
|
||||
@@ -247,70 +247,50 @@
|
||||
<string name="txt_language_title">Muuda keelt</string>
|
||||
|
||||
<string-array name="cat_situation_main">
|
||||
<item>Ähvardav intsident või situatsioon</item>
|
||||
<item>Verbaalne vägivald</item>
|
||||
<item>Kerge kuni raske füüsiline vägivald</item>
|
||||
<item>Eluohtlik vägivald</item>
|
||||
<item>Looduskatastroof</item>
|
||||
<item>Inimkatastroofid & infrastruktuur</item>
|
||||
<item>Threat</item>
|
||||
<item>Physical</item>
|
||||
<item>Life-Threatening</item>
|
||||
<item>Disaster</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_general">
|
||||
<item>Pettus, Vargus, Rööv või Murdvargus</item>
|
||||
<item>Narkomaania nt. uimastid</item>
|
||||
<item>Meeleavaldus, mäss või tee blokaad</item>
|
||||
<item>Kontrollpunktid, Kontrollid</item>
|
||||
<item>Korruptsioon, väljapressimine</item>
|
||||
<item>Kuritegevus, sõjaline või terroristlik tegevus</item>
|
||||
<item>Muu …</item>
|
||||
<string-array name="cat_situation_sub_threat">
|
||||
<item>Robbery</item>
|
||||
<item>Drug related</item>
|
||||
<item>Strike/Riot</item>
|
||||
<item>Checkpoint/Blockade</item>
|
||||
<item>Corruption/Extorsion</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_verbal">
|
||||
<item>Seksuaalne ahistamine</item>
|
||||
<item>Solvav või ähvardav kõnepruuk</item>
|
||||
<item>Ülekuulamine, Survestamine või Sundimine</item>
|
||||
<item>Õhutus</item>
|
||||
<item>Muu …</item>
|
||||
<string-array name="cat_situation_sub_physical">
|
||||
<item>Mugging</item>
|
||||
<item>Sexual Assault</item>
|
||||
<item>Physical Attack</item>
|
||||
<item>Fight</item>
|
||||
<item>Arrest/Capture</item>
|
||||
<item>Forced Labour</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force">
|
||||
<item>Seksuaalne rünnak</item>
|
||||
<item>Füüsiline rünnak üldiselt</item>
|
||||
<item>kaklus või lööming</item>
|
||||
<item>Vahistamine või kinnipidamine</item>
|
||||
<item>Sunnitöö</item>
|
||||
<item>Muu …</item>
|
||||
<string-array name="cat_situation_sub_lifethreat">
|
||||
<item>Rape</item>
|
||||
<item>Kidnapping/Hostage</item>
|
||||
<item>Shooting</item>
|
||||
<item>Bombing</item>
|
||||
<item>Murder</item>
|
||||
<item>Dead body</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force_serious">
|
||||
<item>Vägistamine</item>
|
||||
<item>Piinamine, inimrööv, pantvangi võtmine</item>
|
||||
<item>Tulistamine</item>
|
||||
<item>Pommi või suitsiidi rünnak</item>
|
||||
<item>Mõrv,avalik hukkamine</item>
|
||||
<item>Surnukeha või selle osade näitamine </item>
|
||||
<item>Muu …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_nature">
|
||||
<item>Äärmuslikud temperatuurid</item>
|
||||
<item>Torm, orkaan, tornaado</item>
|
||||
<item>Üleujutus, tsunami</item>
|
||||
<item>Maavärin, maalihe</item>
|
||||
<item>Tulekahju, suits, vulkaanipurse</item>
|
||||
<item>Nälg, põud, loomakatk </item>
|
||||
<item>Muu …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_infrastructure">
|
||||
<item>Õhusaaste</item>
|
||||
<item>Voolukatkestus või üldine õnnetus</item>
|
||||
<item>Hoonete varingud või häving</item>
|
||||
<item>Laia leviulatusega tulekahju</item>
|
||||
<item>Keemiline katastroof või õlileke</item>
|
||||
<item>Haiguspuhang või epideemia</item>
|
||||
<item>Kaos, Anarhia</item>
|
||||
<item>Muu …</item>
|
||||
<string-array name="cat_situation_sub_disaster">
|
||||
<item>Heat Wave</item>
|
||||
<item>Cyclone/Tornado</item>
|
||||
<item>Flood</item>
|
||||
<item>Earthquake</item>
|
||||
<item>Wild Fire</item>
|
||||
<item>Volcano</item>
|
||||
<item>Tsunami</item>
|
||||
<item>Fire</item>
|
||||
<item>Chemical/Oil Spill</item>
|
||||
<item>Epidemic</item>
|
||||
<item>Chaos/Anarchy</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_time_main">
|
||||
@@ -442,5 +422,12 @@
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
</string-array>
|
||||
<string name="alert_notsupported_title">Please update now!</string>
|
||||
<string name="alert_notsupported_text">This version is not supported anymore because of important updates. Please update to a new version of RiskAhead by using your marketplace.</string>
|
||||
<string name="later">Later</string>
|
||||
<string name="alert_notrecommended_title">Please update soon!</string>
|
||||
<string name="alert_notrecommended_text">There is a new version available in your marketplace. We still support your version but it is recommended to perform an update. The support of your version will end soon.</string>
|
||||
<string name="txt_reportlist_deleted">Deleted</string>
|
||||
<string name="txt_register_switchtologin">Already have an account? Login here!</string>
|
||||
|
||||
</resources>
|
||||
@@ -249,70 +249,50 @@
|
||||
<string name="txt_language_title">Vaihda kieltä</string>
|
||||
|
||||
<string-array name="cat_situation_main">
|
||||
<item> Uhkaava tapaus tai tilanne</item>
|
||||
<item>Verbaalinen väkivalta</item>
|
||||
<item>Kevyestä kovaan fyysistä väkivaltaa</item>
|
||||
<item>Hengenvaarallista väkivaltaa</item>
|
||||
<item>Luonnonkatastrofi</item>
|
||||
<item>Ihmisvahingot & Infrastruktuuri</item>
|
||||
<item>Threat</item>
|
||||
<item>Physical</item>
|
||||
<item>Life-Threatening</item>
|
||||
<item>Disaster</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_general">
|
||||
<item>Huijaus, Varkaus, Pahoinpitely tai Murtovarkaus</item>
|
||||
<item>Huumeiden väärinkäyttö esim. Drinkin terästäminen</item>
|
||||
<item>Mielenosoitus, Mellakka tai Tiesulku</item>
|
||||
<item>Tarkastuspisteitä, Tarkastuksia</item>
|
||||
<item>Korruptiota, Kiristystä</item>
|
||||
<item>Rikos, Armeija - tai Terroristi-aktiviteettia </item>
|
||||
<item>Muu …</item>
|
||||
<string-array name="cat_situation_sub_threat">
|
||||
<item>Robbery</item>
|
||||
<item>Drug related</item>
|
||||
<item>Strike/Riot</item>
|
||||
<item>Checkpoint/Blockade</item>
|
||||
<item>Corruption/Extorsion</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_verbal">
|
||||
<item>Seksuaalinen Ahdistelu</item>
|
||||
<item>Loukkaavaa tai Uhkaavaa Kielenkäyttöä</item>
|
||||
<item>Kuulustelu, Painostus tai Pakottaminen</item>
|
||||
<item>Yllyttäminen</item>
|
||||
<item>Muu …</item>
|
||||
<string-array name="cat_situation_sub_physical">
|
||||
<item>Mugging</item>
|
||||
<item>Sexual Assault</item>
|
||||
<item>Physical Attack</item>
|
||||
<item>Fight</item>
|
||||
<item>Arrest/Capture</item>
|
||||
<item>Forced Labour</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force">
|
||||
<item>Seksuaalinen ahdistelu</item>
|
||||
<item>Fyysinen väkivalta</item>
|
||||
<item>Tappelu tai joukkotappelu</item>
|
||||
<item>Pidätys tai sieppaus </item>
|
||||
<item>Pakkotyö</item>
|
||||
<item>Muu …</item>
|
||||
<string-array name="cat_situation_sub_lifethreat">
|
||||
<item>Rape</item>
|
||||
<item>Kidnapping/Hostage</item>
|
||||
<item>Shooting</item>
|
||||
<item>Bombing</item>
|
||||
<item>Murder</item>
|
||||
<item>Dead body</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force_serious">
|
||||
<item>Raiskaus</item>
|
||||
<item>Kidutus, Kidnappaus, Panttivangin ottaminen</item>
|
||||
<item>Ampuminen</item>
|
||||
<item>Pommi tai Itsemurhahyökkäys</item>
|
||||
<item>Murha, Julkinen Teloitus</item>
|
||||
<item>Näkyvillä ruumis tai ruumiinosia </item>
|
||||
<item>Muu …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_nature">
|
||||
<item>Äärilämpötiloja</item>
|
||||
<item>Myrsky, Hurrikaani, Tornado</item>
|
||||
<item>Tulvimista, Tsunami</item>
|
||||
<item>Maanjäristys, Maanvyöry</item>
|
||||
<item>Tuli, Savu, Tulivuorenpurkaus</item>
|
||||
<item>Nälänhätä, Kuivuus, Karjarutto </item>
|
||||
<item>Muu …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_infrastructure">
|
||||
<item>Ilmansaaste</item>
|
||||
<item>Sähkökatkos tai Onnettomuus</item>
|
||||
<item>Romahtavia rakennuksia tai Tuhoutuminen</item>
|
||||
<item>Laajalle levinnyt tulipalo</item>
|
||||
<item>Kemiallinen onnettomuus tai Öljyvuoto</item>
|
||||
<item>Taudin leviäminen tai Epidemia</item>
|
||||
<item>Kaaos, Anarkia</item>
|
||||
<item>Muu …</item>
|
||||
<string-array name="cat_situation_sub_disaster">
|
||||
<item>Heat Wave</item>
|
||||
<item>Cyclone/Tornado</item>
|
||||
<item>Flood</item>
|
||||
<item>Earthquake</item>
|
||||
<item>Wild Fire</item>
|
||||
<item>Volcano</item>
|
||||
<item>Tsunami</item>
|
||||
<item>Fire</item>
|
||||
<item>Chemical/Oil Spill</item>
|
||||
<item>Epidemic</item>
|
||||
<item>Chaos/Anarchy</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_time_main">
|
||||
@@ -444,4 +424,11 @@
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
</string-array>
|
||||
<string name="alert_notsupported_title">Please update now!</string>
|
||||
<string name="alert_notsupported_text">This version is not supported anymore because of important updates. Please update to a new version of RiskAhead by using your marketplace.</string>
|
||||
<string name="later">Later</string>
|
||||
<string name="alert_notrecommended_title">Please update soon!</string>
|
||||
<string name="alert_notrecommended_text">There is a new version available in your marketplace. We still support your version but it is recommended to perform an update. The support of your version will end soon.</string>
|
||||
<string name="txt_reportlist_deleted">Deleted</string>
|
||||
<string name="txt_register_switchtologin">Already have an account? Login here!</string>
|
||||
</resources>
|
||||
@@ -244,70 +244,50 @@
|
||||
<string name="txt_language_title">Changer Langue</string>
|
||||
|
||||
<string-array name="cat_situation_main">
|
||||
<item>Incident ou situation menaçante</item>
|
||||
<item>Violence verbale</item>
|
||||
<item>Violence légère à lourde</item>
|
||||
<item>Violence mortelle</item>
|
||||
<item>Catastrophe naturelle</item>
|
||||
<item>Catastrophe humaine & Infrastructure</item>
|
||||
<item>Threat</item>
|
||||
<item>Physical</item>
|
||||
<item>Life-Threatening</item>
|
||||
<item>Disaster</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_general">
|
||||
<item>Fraude, vol, cambriolage, ???</item>
|
||||
<item>prévention de la toxicomanie ou ????</item>
|
||||
<item>Démonstration, émeute ou barrage routier</item>
|
||||
<item>Point de contrôle, Contrôles</item>
|
||||
<item>Corruption, Extortion</item>
|
||||
<item>Crime, activités militaires ou terroristes</item>
|
||||
<item>autre …</item>
|
||||
<string-array name="cat_situation_sub_threat">
|
||||
<item>Robbery</item>
|
||||
<item>Drug related</item>
|
||||
<item>Strike/Riot</item>
|
||||
<item>Checkpoint/Blockade</item>
|
||||
<item>Corruption/Extorsion</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_verbal">
|
||||
<item>Harcèlement sexuel</item>
|
||||
<item>Langage insultant ou menaçant</item>
|
||||
<item>Interrogatoire, pression ou contrainte</item>
|
||||
<item>Incitement</item>
|
||||
<item>Autre …</item>
|
||||
<string-array name="cat_situation_sub_physical">
|
||||
<item>Mugging</item>
|
||||
<item>Sexual Assault</item>
|
||||
<item>Physical Attack</item>
|
||||
<item>Fight</item>
|
||||
<item>Arrest/Capture</item>
|
||||
<item>Forced Labour</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force">
|
||||
<item>agression sexuelle</item>
|
||||
<item>attaque physique généralisée</item>
|
||||
<item>combat ou rixe</item>
|
||||
<item>Arrestation ou capture </item>
|
||||
<item>travail forcé</item>
|
||||
<item>autre …</item>
|
||||
<string-array name="cat_situation_sub_lifethreat">
|
||||
<item>Rape</item>
|
||||
<item>Kidnapping/Hostage</item>
|
||||
<item>Shooting</item>
|
||||
<item>Bombing</item>
|
||||
<item>Murder</item>
|
||||
<item>Dead body</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force_serious">
|
||||
<item>Viol</item>
|
||||
<item>Torture, Kidnapping, prise d\'otage</item>
|
||||
<item>Fusillade</item>
|
||||
<item>Bombe ou attentat</item>
|
||||
<item>Meurtre, exécution publique</item>
|
||||
<item>Affichage de cadavre ou de parties de cadavre </item>
|
||||
<item>autre …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_nature">
|
||||
<item>Températures extrêmes</item>
|
||||
<item>Tempête, ouragan, tornade</item>
|
||||
<item>Innondation, Tsunami</item>
|
||||
<item>Tremblement de terre, glissement de terrain</item>
|
||||
<item>Feu, fumée, irruption volcanique</item>
|
||||
<item>Famine, sécheresse, peste animal </item>
|
||||
<item>autre …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_infrastructure">
|
||||
<item>Pollution de l\'air</item>
|
||||
<item>Panne de courant ou accident général</item>
|
||||
<item>Effondrement de bâtiment ou destruction</item>
|
||||
<item>Feu généralisé</item>
|
||||
<item>Catastrophe chimique ou déversement de pétrole</item>
|
||||
<item>Maladie déclenchement ou épidémie</item>
|
||||
<item>Chaos, Anarchie</item>
|
||||
<item>autre …</item>
|
||||
<string-array name="cat_situation_sub_disaster">
|
||||
<item>Heat Wave</item>
|
||||
<item>Cyclone/Tornado</item>
|
||||
<item>Flood</item>
|
||||
<item>Earthquake</item>
|
||||
<item>Wild Fire</item>
|
||||
<item>Volcano</item>
|
||||
<item>Tsunami</item>
|
||||
<item>Fire</item>
|
||||
<item>Chemical/Oil Spill</item>
|
||||
<item>Epidemic</item>
|
||||
<item>Chaos/Anarchy</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_time_main">
|
||||
@@ -439,4 +419,11 @@
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
</string-array>
|
||||
<string name="alert_notsupported_title">Please update now!</string>
|
||||
<string name="alert_notsupported_text">This version is not supported anymore because of important updates. Please update to a new version of RiskAhead by using your marketplace.</string>
|
||||
<string name="later">Later</string>
|
||||
<string name="alert_notrecommended_title">Please update soon!</string>
|
||||
<string name="alert_notrecommended_text">There is a new version available in your marketplace. We still support your version but it is recommended to perform an update. The support of your version will end soon.</string>
|
||||
<string name="txt_reportlist_deleted">Deleted</string>
|
||||
<string name="txt_register_switchtologin">Already have an account? Login here!</string>
|
||||
</resources>
|
||||
@@ -247,70 +247,50 @@
|
||||
<string name="txt_language_title">Mainīt valodu</string>
|
||||
|
||||
<string-array name="cat_situation_main">
|
||||
<item>Bīstams incidents vai stāvoklis</item>
|
||||
<item>Verbālā vardarbība</item>
|
||||
<item>Viegla līdz smaga fiziskā vardarbība</item>
|
||||
<item>Dzīvībai bīstama vardarbība</item>
|
||||
<item>Dabas katastrofa</item>
|
||||
<item>Cilvēku izraisīta katastrofa & Infrastruktūra</item>
|
||||
<item>Threat</item>
|
||||
<item>Physical</item>
|
||||
<item>Life-Threatening</item>
|
||||
<item>Disaster</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_general">
|
||||
<item>Krāpšana, zādzība, laupīšana vai ielaušanās</item>
|
||||
<item>Sazāļošana, piem., dzēriena sazāļošana</item>
|
||||
<item>Demonstrācija, dumpis vai ceļu blokāde</item>
|
||||
<item>Kontrolpunkti, kontroles</item>
|
||||
<item>Korupcija, izspiešana</item>
|
||||
<item>Noziegums, zemessardzes vai terositu darbības</item>
|
||||
<item>Cits …</item>
|
||||
<string-array name="cat_situation_sub_threat">
|
||||
<item>Robbery</item>
|
||||
<item>Drug related</item>
|
||||
<item>Strike/Riot</item>
|
||||
<item>Checkpoint/Blockade</item>
|
||||
<item>Corruption/Extorsion</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_verbal">
|
||||
<item>Seksuāla uzmākšanās</item>
|
||||
<item>Aizskaroša vai apdraudoša valoda</item>
|
||||
<item>Pratināšana, piespiešana vai apspiešana</item>
|
||||
<item>Kūdīšana</item>
|
||||
<item>Cits …</item>
|
||||
<string-array name="cat_situation_sub_physical">
|
||||
<item>Mugging</item>
|
||||
<item>Sexual Assault</item>
|
||||
<item>Physical Attack</item>
|
||||
<item>Fight</item>
|
||||
<item>Arrest/Capture</item>
|
||||
<item>Forced Labour</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force">
|
||||
<item>Seksuāls uzbrukums</item>
|
||||
<item>Fizisks uzbrukums</item>
|
||||
<item>Cīņa vai tracis</item>
|
||||
<item>Arests vai sagūstīšana </item>
|
||||
<item>Piespiedu darbs</item>
|
||||
<item>Cits …</item>
|
||||
<string-array name="cat_situation_sub_lifethreat">
|
||||
<item>Rape</item>
|
||||
<item>Kidnapping/Hostage</item>
|
||||
<item>Shooting</item>
|
||||
<item>Bombing</item>
|
||||
<item>Murder</item>
|
||||
<item>Dead body</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force_serious">
|
||||
<item>Izvarošana</item>
|
||||
<item>Spīdzināšana, nolaupīšana, ķīlnieku sagūstīšana</item>
|
||||
<item>Apšaude</item>
|
||||
<item>Spridzekļu vai pašnāvnieku uzbrukums</item>
|
||||
<item>Slepkavība, publisks nāvessods</item>
|
||||
<item>Līķu vai ķermeņa daļu izstādīšana </item>
|
||||
<item>Cits …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_nature">
|
||||
<item>Ekstremālas gaisa temperatūras</item>
|
||||
<item>Vētra, orkāns, viesuļvētra</item>
|
||||
<item>Plūdi, cunami</item>
|
||||
<item>Zemestrīce, nogruvums</item>
|
||||
<item>Ugunsgrēks, dūmi, vulkāna izvirdums</item>
|
||||
<item>Bads, sausums, dzīvnieku mēris </item>
|
||||
<item>Cits …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_infrastructure">
|
||||
<item>Gaisa piesārņojums</item>
|
||||
<item>Enerģijas pārtraukums vai nelaimes gadījums</item>
|
||||
<item>Ēkas sabrukšana vai izpostīšana</item>
|
||||
<item>Plašs ugunsgrēks</item>
|
||||
<item>Ķīmiskā katastrofa vai naftas noplūde</item>
|
||||
<item>Slimības uzliesmojums vai epidēmija</item>
|
||||
<item>Haoss, anarhija</item>
|
||||
<item>Cits …</item>
|
||||
<string-array name="cat_situation_sub_disaster">
|
||||
<item>Heat Wave</item>
|
||||
<item>Cyclone/Tornado</item>
|
||||
<item>Flood</item>
|
||||
<item>Earthquake</item>
|
||||
<item>Wild Fire</item>
|
||||
<item>Volcano</item>
|
||||
<item>Tsunami</item>
|
||||
<item>Fire</item>
|
||||
<item>Chemical/Oil Spill</item>
|
||||
<item>Epidemic</item>
|
||||
<item>Chaos/Anarchy</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_time_main">
|
||||
@@ -442,4 +422,11 @@
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
</string-array>
|
||||
<string name="alert_notsupported_title">Please update now!</string>
|
||||
<string name="alert_notsupported_text">This version is not supported anymore because of important updates. Please update to a new version of RiskAhead by using your marketplace.</string>
|
||||
<string name="later">Later</string>
|
||||
<string name="alert_notrecommended_title">Please update soon!</string>
|
||||
<string name="alert_notrecommended_text">There is a new version available in your marketplace. We still support your version but it is recommended to perform an update. The support of your version will end soon.</string>
|
||||
<string name="txt_reportlist_deleted">Deleted</string>
|
||||
<string name="txt_register_switchtologin">Already have an account? Login here!</string>
|
||||
</resources>
|
||||
@@ -249,72 +249,50 @@
|
||||
<string name="txt_language_title">Хэл солих</string>
|
||||
|
||||
<string-array name="cat_situation_main">
|
||||
<item> Аюултай нөхцөл байдал</item>
|
||||
|
||||
<item>Сэтгэл зүйн хүчирхийлэл</item>
|
||||
<item>Хөнгөнөөс хүнд хүртэлх бие махбодийн хүчирхийлэл</item>
|
||||
<item>Амь насанд аюултай хүчирхийлэл</item>
|
||||
<item>Байгалийн гамшиг</item>
|
||||
<item>Хүний буруутай үйлдлээс үүдэлтэй гамшиг & Дэд бүтэц</item>
|
||||
<item>Threat</item>
|
||||
<item>Physical</item>
|
||||
<item>Life-Threatening</item>
|
||||
<item>Disaster</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_general">
|
||||
<item>залилан, хулгай, халдлага, орон байрны хулгай</item>
|
||||
<item>Хар тамхи</item>
|
||||
<item>Жагсаал цуглаан, үймээн, замд саад учруулах</item>
|
||||
<item>Шалган нэвтрүүлэх цэг, Хяналт</item>
|
||||
<item>Авилга, Сүрдүүлэг</item>
|
||||
<item>Гэмт хэрэг, Цэргийн эсвэл тероррист үйл ажиллагаа</item>
|
||||
<item>Бусад …</item>
|
||||
<string-array name="cat_situation_sub_threat">
|
||||
<item>Robbery</item>
|
||||
<item>Drug related</item>
|
||||
<item>Strike/Riot</item>
|
||||
<item>Checkpoint/Blockade</item>
|
||||
<item>Corruption/Extorsion</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_verbal">
|
||||
<item>Бэлгийн дарамт</item>
|
||||
<item>Доромжлох эсвэл хэл ярианд занал хийх </item>
|
||||
<item>Байцаах, Дарамт буюу албадлага</item>
|
||||
<item>Турхиралт</item>
|
||||
<item>Бусад …</item>
|
||||
<string-array name="cat_situation_sub_physical">
|
||||
<item>Mugging</item>
|
||||
<item>Sexual Assault</item>
|
||||
<item>Physical Attack</item>
|
||||
<item>Fight</item>
|
||||
<item>Arrest/Capture</item>
|
||||
<item>Forced Labour</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force">
|
||||
<item>Бэлгийн дарамт үзүүлэхээр завдах</item>
|
||||
<item>Бие мах бодийн дайралт</item>
|
||||
<item>Зодоон </item>
|
||||
<item>Баривчилгаа </item>
|
||||
<item>Албадан хөдөлмөрлүүлэх</item>
|
||||
<item>Бусад…</item>
|
||||
<string-array name="cat_situation_sub_lifethreat">
|
||||
<item>Rape</item>
|
||||
<item>Kidnapping/Hostage</item>
|
||||
<item>Shooting</item>
|
||||
<item>Bombing</item>
|
||||
<item>Murder</item>
|
||||
<item>Dead body</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force_serious">
|
||||
<item>Хүчингийн хэрэг</item>
|
||||
<item>Эрүү шүүлт, хүн хулгайлах, барьцаалах</item>
|
||||
<item>Буудалцах</item>
|
||||
<item>Тэсрэх бөмбөг буюу амиа хорлох довтолгоо</item>
|
||||
<item>Аллага, цаазаар авах</item>
|
||||
<item>Цогцсын хэсэг</item>
|
||||
<item>Бусад …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_nature">
|
||||
<item>Хэт их температур</item>
|
||||
<item>Шуурга, хар салхи</item>
|
||||
<item>Үер, цунами</item>
|
||||
<item>Газар хөдлөлт, хөрсний нуралт</item>
|
||||
<item>Гал, утаа, галт уулын дэлбэрэлт</item>
|
||||
<item>Өлсгөлөн, ган, тарваган тахал </item>
|
||||
<item>Бусад …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_infrastructure">
|
||||
<item>Агаарын бохирдол</item>
|
||||
<item>Цахилгаан тасрах буюу ерөнхий осол</item>
|
||||
<item>Барилгын нуралт буюу устгал</item>
|
||||
<item>Өргөн хүрээтэй гал түймэр</item>
|
||||
|
||||
<item>Химийн осол буюу газрын тос алдагдах</item>
|
||||
<item>Халдварт өвчин гарах буюу тархах</item>
|
||||
<item>Эмх замбараагүй байдал</item>
|
||||
<item>Бусад …</item>
|
||||
<string-array name="cat_situation_sub_disaster">
|
||||
<item>Heat Wave</item>
|
||||
<item>Cyclone/Tornado</item>
|
||||
<item>Flood</item>
|
||||
<item>Earthquake</item>
|
||||
<item>Wild Fire</item>
|
||||
<item>Volcano</item>
|
||||
<item>Tsunami</item>
|
||||
<item>Fire</item>
|
||||
<item>Chemical/Oil Spill</item>
|
||||
<item>Epidemic</item>
|
||||
<item>Chaos/Anarchy</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_time_main">
|
||||
@@ -446,4 +424,11 @@
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
</string-array>
|
||||
<string name="alert_notsupported_title">Please update now!</string>
|
||||
<string name="alert_notsupported_text">This version is not supported anymore because of important updates. Please update to a new version of RiskAhead by using your marketplace.</string>
|
||||
<string name="later">Later</string>
|
||||
<string name="alert_notrecommended_title">Please update soon!</string>
|
||||
<string name="alert_notrecommended_text">There is a new version available in your marketplace. We still support your version but it is recommended to perform an update. The support of your version will end soon.</string>
|
||||
<string name="txt_reportlist_deleted">Deleted</string>
|
||||
<string name="txt_register_switchtologin">Already have an account? Login here!</string>
|
||||
</resources>
|
||||
@@ -247,70 +247,50 @@
|
||||
<string name="txt_language_title">Verander Taal</string>
|
||||
|
||||
<string-array name="cat_situation_main">
|
||||
<item>Een dreigend Incident of Situatie</item>
|
||||
<item>Verbaal geweld</item>
|
||||
<item>Licht tot Zwaar Lichamelijk Geweld</item>
|
||||
<item>Levensbedreigend Geweld</item>
|
||||
<item>Natuurramp</item>
|
||||
<item>Menselijke Rampen & Infrastructuur</item>
|
||||
<item>Threat</item>
|
||||
<item>Physical</item>
|
||||
<item>Life-Threatening</item>
|
||||
<item>Disaster</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_general">
|
||||
<item>Oplichting, Diefstal, Beroving of Inbraak</item>
|
||||
<item>Drugs Misbruik bijv. Drugs in drankje</item>
|
||||
<item>Demonstratie, Rellen of Wegversperring</item>
|
||||
<item>Controlepost, Controle</item>
|
||||
<item>Corruptie, Afpersing</item>
|
||||
<item>Criminaliteit, Militie or Terrorist Activiteiten</item>
|
||||
<item>Anders …</item>
|
||||
<string-array name="cat_situation_sub_threat">
|
||||
<item>Robbery</item>
|
||||
<item>Drug related</item>
|
||||
<item>Strike/Riot</item>
|
||||
<item>Checkpoint/Blockade</item>
|
||||
<item>Corruption/Extorsion</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_verbal">
|
||||
<item>Sexuele Overlast</item>
|
||||
<item>Beledigend of dreigende taal</item>
|
||||
<item>Ondervraging, onder druk zetten of dwang</item>
|
||||
<item>Aansporing</item>
|
||||
<item>Anders …</item>
|
||||
<string-array name="cat_situation_sub_physical">
|
||||
<item>Mugging</item>
|
||||
<item>Sexual Assault</item>
|
||||
<item>Physical Attack</item>
|
||||
<item>Fight</item>
|
||||
<item>Arrest/Capture</item>
|
||||
<item>Forced Labour</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force">
|
||||
<item>Sexuele Aanval</item>
|
||||
<item>Fysieke Aanval in het algemeen</item>
|
||||
<item>Een Gevecht of vechtpartij</item>
|
||||
<item>Arrestatie of Gevangenneming</item>
|
||||
<item>Gedwongen Arbeid</item>
|
||||
<item>Anders …</item>
|
||||
<string-array name="cat_situation_sub_lifethreat">
|
||||
<item>Rape</item>
|
||||
<item>Kidnapping/Hostage</item>
|
||||
<item>Shooting</item>
|
||||
<item>Bombing</item>
|
||||
<item>Murder</item>
|
||||
<item>Dead body</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force_serious">
|
||||
<item>Verkrachting</item>
|
||||
<item>Marteling, ontvoering, gijzeling</item>
|
||||
<item>Beschieting</item>
|
||||
<item>Bom of Zelfmoord Aanval</item>
|
||||
<item>Moord, Publieke Executie</item>
|
||||
<item>Tentoonstelling van lijk of lijkdelen</item>
|
||||
<item>Anders …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_nature">
|
||||
<item>Extreme Temperaturen</item>
|
||||
<item>Storm, Orkaan, Tornado</item>
|
||||
<item>Overstroming, Tsunami</item>
|
||||
<item>Aardbeving, Aardverschuiving</item>
|
||||
<item>Brand, Rook, Vulkaanuitbarsting</item>
|
||||
<item>Hongersnood, Droogte, Dieren plaag </item>
|
||||
<item>Anders …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_infrastructure">
|
||||
<item>Luchtvervuiling</item>
|
||||
<item>Stroomstoring of Algemeen Ongeval</item>
|
||||
<item>Instortende of Slopen Gebouwen</item>
|
||||
<item>Wijdverspreide brand</item>
|
||||
<item>Chemische of olieramp</item>
|
||||
<item>Ziekte-uitbraak of epidemie</item>
|
||||
<item>Chaos, anarchie</item>
|
||||
<item>Anders …</item>
|
||||
<string-array name="cat_situation_sub_disaster">
|
||||
<item>Heat Wave</item>
|
||||
<item>Cyclone/Tornado</item>
|
||||
<item>Flood</item>
|
||||
<item>Earthquake</item>
|
||||
<item>Wild Fire</item>
|
||||
<item>Volcano</item>
|
||||
<item>Tsunami</item>
|
||||
<item>Fire</item>
|
||||
<item>Chemical/Oil Spill</item>
|
||||
<item>Epidemic</item>
|
||||
<item>Chaos/Anarchy</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_time_main">
|
||||
@@ -442,4 +422,11 @@
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
</string-array>
|
||||
<string name="alert_notsupported_title">Please update now!</string>
|
||||
<string name="alert_notsupported_text">This version is not supported anymore because of important updates. Please update to a new version of RiskAhead by using your marketplace.</string>
|
||||
<string name="later">Later</string>
|
||||
<string name="alert_notrecommended_title">Please update soon!</string>
|
||||
<string name="alert_notrecommended_text">There is a new version available in your marketplace. We still support your version but it is recommended to perform an update. The support of your version will end soon.</string>
|
||||
<string name="txt_reportlist_deleted">Deleted</string>
|
||||
<string name="txt_register_switchtologin">Already have an account? Login here!</string>
|
||||
</resources>
|
||||
@@ -247,70 +247,50 @@
|
||||
<string name="txt_language_title">Zmień język</string>
|
||||
|
||||
<string-array name="cat_situation_main">
|
||||
<item>Niebezpieczne zdarzenie lub sytuacja</item>
|
||||
<item>Przemoc słowna</item>
|
||||
<item>Lekka lub poważna przemoc fizyczna</item>
|
||||
<item>Przemoc zagrażająca życiu</item>
|
||||
<item>Klęska żywiołowa</item>
|
||||
<item>Zagrożenie wywołane przez ludzi & Infrastruktura</item>
|
||||
<item>Threat</item>
|
||||
<item>Physical</item>
|
||||
<item>Life-Threatening</item>
|
||||
<item>Disaster</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_general">
|
||||
<item>Oszustwo, kradzież, napad lub włamanie</item>
|
||||
<item>Narkotyki, np. podawane w drinkach</item>
|
||||
<item>Demonstracje lub blokady drogowe</item>
|
||||
<item>Rewizje, kontrole</item>
|
||||
<item>Korupcja, wymuszenia</item>
|
||||
<item>Przestępcy, terroryści, bojówki</item>
|
||||
<item>Inne …</item>
|
||||
<string-array name="cat_situation_sub_threat">
|
||||
<item>Robbery</item>
|
||||
<item>Drug related</item>
|
||||
<item>Strike/Riot</item>
|
||||
<item>Checkpoint/Blockade</item>
|
||||
<item>Corruption/Extorsion</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_verbal">
|
||||
<item>Sexual Harassment</item>
|
||||
<item>Insulting or Threatening Language</item>
|
||||
<item>Interrogation, Pressuring or Coercing</item>
|
||||
<item>Incitement</item>
|
||||
<item>Other …</item>
|
||||
<string-array name="cat_situation_sub_physical">
|
||||
<item>Mugging</item>
|
||||
<item>Sexual Assault</item>
|
||||
<item>Physical Attack</item>
|
||||
<item>Fight</item>
|
||||
<item>Arrest/Capture</item>
|
||||
<item>Forced Labour</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force">
|
||||
<item>Molestowanie</item>
|
||||
<item>Ogólne ataki fizyczne</item>
|
||||
<item>Bójka</item>
|
||||
<item>Aresztowanie lub schwytanie</item>
|
||||
<item>Praca przymusowa</item>
|
||||
<item>Inne …</item>
|
||||
<string-array name="cat_situation_sub_lifethreat">
|
||||
<item>Rape</item>
|
||||
<item>Kidnapping/Hostage</item>
|
||||
<item>Shooting</item>
|
||||
<item>Bombing</item>
|
||||
<item>Murder</item>
|
||||
<item>Dead body</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force_serious">
|
||||
<item>Gwałt</item>
|
||||
<item>Torturowanie, porwanie, zakładnicy</item>
|
||||
<item>Strzelanina</item>
|
||||
<item>Atak bombowy lub samobójczy</item>
|
||||
<item>Morderstwo, publiczna egzekucja</item>
|
||||
<item>Pokazywanie martwych ciał</item>
|
||||
<item>Inne …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_nature">
|
||||
<item>Skrajne temperatury</item>
|
||||
<item>Burza, huragan, tornado</item>
|
||||
<item>Powódź, tsunami</item>
|
||||
<item>Trzęsienie ziemi, osunięcie ziemi</item>
|
||||
<item>Ogień, dym, erupcja wulkanu</item>
|
||||
<item>Głód, susza, zaraza zwierzęca </item>
|
||||
<item>Inne …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_infrastructure">
|
||||
<item>Zanieczyszczenie powietrza</item>
|
||||
<item>Brak energii lub ogólny wypadek</item>
|
||||
<item>Zawalenie lub zniszczenie budynku</item>
|
||||
<item>Rozległy pożar</item>
|
||||
<item>Katastrofa chemiczna lub wyciek ropy</item>
|
||||
<item>Epidemia</item>
|
||||
<item>Chaos, anarchia</item>
|
||||
<item>Inne …</item>
|
||||
<string-array name="cat_situation_sub_disaster">
|
||||
<item>Heat Wave</item>
|
||||
<item>Cyclone/Tornado</item>
|
||||
<item>Flood</item>
|
||||
<item>Earthquake</item>
|
||||
<item>Wild Fire</item>
|
||||
<item>Volcano</item>
|
||||
<item>Tsunami</item>
|
||||
<item>Fire</item>
|
||||
<item>Chemical/Oil Spill</item>
|
||||
<item>Epidemic</item>
|
||||
<item>Chaos/Anarchy</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_time_main">
|
||||
@@ -442,4 +422,11 @@
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
</string-array>
|
||||
<string name="alert_notsupported_title">Please update now!</string>
|
||||
<string name="alert_notsupported_text">This version is not supported anymore because of important updates. Please update to a new version of RiskAhead by using your marketplace.</string>
|
||||
<string name="later">Later</string>
|
||||
<string name="alert_notrecommended_title">Please update soon!</string>
|
||||
<string name="alert_notrecommended_text">There is a new version available in your marketplace. We still support your version but it is recommended to perform an update. The support of your version will end soon.</string>
|
||||
<string name="txt_reportlist_deleted">Deleted</string>
|
||||
<string name="txt_register_switchtologin">Already have an account? Login here!</string>
|
||||
</resources>
|
||||
@@ -261,70 +261,50 @@ Não foi possível recuperar as configurações do perfil
|
||||
|
||||
|
||||
<string-array name="cat_situation_main">
|
||||
<item> Um incidente ou situação de ameaça</item>
|
||||
<item>Violência Verbal</item>
|
||||
<item>Violência Física</item>
|
||||
<item>Ameaça de morte </item>
|
||||
<item>Disastre natural</item>
|
||||
<item>Disastre humano & Infraestrutura</item>
|
||||
<item>Threat</item>
|
||||
<item>Physical</item>
|
||||
<item>Life-Threatening</item>
|
||||
<item>Disaster</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_general">
|
||||
<item>Fraude, furto, roubo ou agressão</item>
|
||||
<item>Abuso de Drogas bebida </item>
|
||||
<item>Demonstração, motim, manifestação ou bloqueio rodoviário</item>
|
||||
<item>Postos de controle, Controles</item>
|
||||
<item>Corrupção, Extorção</item>
|
||||
<item>Crime, Milicia ou atividades terroristas</item>
|
||||
<item>Outro…</item>
|
||||
<string-array name="cat_situation_sub_threat">
|
||||
<item>Robbery</item>
|
||||
<item>Drug related</item>
|
||||
<item>Strike/Riot</item>
|
||||
<item>Checkpoint/Blockade</item>
|
||||
<item>Corruption/Extorsion</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_verbal">
|
||||
<item>Abuso Sexual</item>
|
||||
<item>Linguagem insultuosa e ameaçando</item>
|
||||
<item>Interrogatório, pressionar ou coagir</item>
|
||||
<item>Inciamento</item>
|
||||
<item>Outro …</item>
|
||||
<string-array name="cat_situation_sub_physical">
|
||||
<item>Mugging</item>
|
||||
<item>Sexual Assault</item>
|
||||
<item>Physical Attack</item>
|
||||
<item>Fight</item>
|
||||
<item>Arrest/Capture</item>
|
||||
<item>Forced Labour</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force">
|
||||
<item>Agressão sexual</item>
|
||||
<item>Ataque fisico em geral</item>
|
||||
<item>Uma briga, Luta</item>
|
||||
<item>Prender ou capturar</item>
|
||||
<item>Trabalho Forçado</item>
|
||||
<item>Outro …</item>
|
||||
<string-array name="cat_situation_sub_lifethreat">
|
||||
<item>Rape</item>
|
||||
<item>Kidnapping/Hostage</item>
|
||||
<item>Shooting</item>
|
||||
<item>Bombing</item>
|
||||
<item>Murder</item>
|
||||
<item>Dead body</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force_serious">
|
||||
<item>Estrupo</item>
|
||||
<item>Tortura, Sequestro, Refens</item>
|
||||
<item>Tiroteio</item>
|
||||
<item>Ataque suicida, Bombas</item>
|
||||
<item>Execução Publica, assassinato</item>
|
||||
<item>Exibição de corpos </item>
|
||||
<item>Outros …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_nature">
|
||||
<item>Temperaturas extremas</item>
|
||||
<item>Tempestade, Furacão, Tornado</item>
|
||||
<item>Inundação, Tsunami</item>
|
||||
<item>Terremoto, Deslizamento</item>
|
||||
<item>Fogo,Fumaça, Erupção Vulcanica</item>
|
||||
<item>Fome, seca, peste animal</item>
|
||||
<item>Outro …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_infrastructure">
|
||||
<item>Poluição do Ar</item>
|
||||
<item>Falha de energia ou General Accident</item>
|
||||
<item>Edifícios em colapso ou destruição</item>
|
||||
<item>Fogo generalizado</item>
|
||||
<item>Derramento de oléo ou desastre químico</item>
|
||||
<item>Surto ou epidemia da doença</item>
|
||||
<item>Caos, anarquia</item>
|
||||
<item>Outro …</item>
|
||||
<string-array name="cat_situation_sub_disaster">
|
||||
<item>Heat Wave</item>
|
||||
<item>Cyclone/Tornado</item>
|
||||
<item>Flood</item>
|
||||
<item>Earthquake</item>
|
||||
<item>Wild Fire</item>
|
||||
<item>Volcano</item>
|
||||
<item>Tsunami</item>
|
||||
<item>Fire</item>
|
||||
<item>Chemical/Oil Spill</item>
|
||||
<item>Epidemic</item>
|
||||
<item>Chaos/Anarchy</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_time_main">
|
||||
@@ -457,5 +437,13 @@ Não foi possível recuperar as configurações do perfil
|
||||
<item>60</item>
|
||||
</string-array>
|
||||
<string name="lbl_map_search">Search</string>
|
||||
<string name="alert_accactivation_confirmation">E-Mail was sent to your e-mail address</string>
|
||||
<string name="alert_notsupported_title">Please update now!</string>
|
||||
<string name="alert_notsupported_text">This version is not supported anymore because of important updates. Please update to a new version of RiskAhead by using your marketplace.</string>
|
||||
<string name="later">Later</string>
|
||||
<string name="alert_notrecommended_title">Please update soon!</string>
|
||||
<string name="alert_notrecommended_text">There is a new version available in your marketplace. We still support your version but it is recommended to perform an update. The support of your version will end soon.</string>
|
||||
<string name="txt_reportlist_deleted">Deleted</string>
|
||||
<string name="txt_register_switchtologin">Already have an account? Login here!</string>
|
||||
|
||||
</resources>
|
||||
@@ -245,70 +245,50 @@
|
||||
<string name="txt_language_title">изменить язык</string>
|
||||
|
||||
<string-array name="cat_situation_main">
|
||||
<item>Угрожающее происшествие или ситуация</item>
|
||||
<item>Словесная перепалка</item>
|
||||
<item>Виды физического насилия</item>
|
||||
<item>Угроза для жизни</item>
|
||||
<item>Природная катастрофа</item>
|
||||
<item>Техногенная катастрофа&</item>
|
||||
<item>Threat</item>
|
||||
<item>Physical</item>
|
||||
<item>Life-Threatening</item>
|
||||
<item>Disaster</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_general">
|
||||
<item>кража,грабеж,воровство</item>
|
||||
<item>злоупотребление наркотиками</item>
|
||||
<item>демонстрации,бунты </item>
|
||||
<item>контрольные пункты</item>
|
||||
<item>коррупция или вымогательство</item>
|
||||
<item>криминал или активность террористов</item>
|
||||
<item>другое …</item>
|
||||
<string-array name="cat_situation_sub_threat">
|
||||
<item>Robbery</item>
|
||||
<item>Drug related</item>
|
||||
<item>Strike/Riot</item>
|
||||
<item>Checkpoint/Blockade</item>
|
||||
<item>Corruption/Extorsion</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_verbal">
|
||||
<item>сексуальное насилие</item>
|
||||
<item>оскорбление или словесная угроза</item>
|
||||
<item>оказание давление или принуждение</item>
|
||||
<item>подстрекательство</item>
|
||||
<item>другое …</item>
|
||||
<string-array name="cat_situation_sub_physical">
|
||||
<item>Mugging</item>
|
||||
<item>Sexual Assault</item>
|
||||
<item>Physical Attack</item>
|
||||
<item>Fight</item>
|
||||
<item>Arrest/Capture</item>
|
||||
<item>Forced Labour</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force">
|
||||
<item>сексуальное насилие</item>
|
||||
<item>физическое нападение</item>
|
||||
<item>драка или ссора</item>
|
||||
<item>арест или захват заложников </item>
|
||||
<item>принудительный труд</item>
|
||||
<item>другое …</item>
|
||||
<string-array name="cat_situation_sub_lifethreat">
|
||||
<item>Rape</item>
|
||||
<item>Kidnapping/Hostage</item>
|
||||
<item>Shooting</item>
|
||||
<item>Bombing</item>
|
||||
<item>Murder</item>
|
||||
<item>Dead body</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force_serious">
|
||||
<item>изнасилование</item>
|
||||
<item>пытка,похищение,захват заложников</item>
|
||||
<item>стрельба</item>
|
||||
<item>взрыв или атака смертника</item>
|
||||
<item>убийство, публичная казнь</item>
|
||||
<item>труп или части тела</item>
|
||||
<item>другое …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_nature">
|
||||
<item>экстремальная температура</item>
|
||||
<item>шторм,буря,торнадо</item>
|
||||
<item>затопление или цунами</item>
|
||||
<item>землетрясение</item>
|
||||
<item>огонь,дым,извержение вулкана</item>
|
||||
<item>голод,засуха </item>
|
||||
<item>другое …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_infrastructure">
|
||||
<item>загрязнение воздуха</item>
|
||||
<item>перебои с электричеством</item>
|
||||
<item>разрушение зданий</item>
|
||||
<item>пожар</item>
|
||||
<item>химическая катастрофа</item>
|
||||
<item>вспышка заболевания или эпидемия</item>
|
||||
<item>хаос и анархия</item>
|
||||
<item>другое …</item>
|
||||
<string-array name="cat_situation_sub_disaster">
|
||||
<item>Heat Wave</item>
|
||||
<item>Cyclone/Tornado</item>
|
||||
<item>Flood</item>
|
||||
<item>Earthquake</item>
|
||||
<item>Wild Fire</item>
|
||||
<item>Volcano</item>
|
||||
<item>Tsunami</item>
|
||||
<item>Fire</item>
|
||||
<item>Chemical/Oil Spill</item>
|
||||
<item>Epidemic</item>
|
||||
<item>Chaos/Anarchy</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_time_main">
|
||||
@@ -440,4 +420,11 @@
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
</string-array>
|
||||
<string name="alert_notsupported_title">Please update now!</string>
|
||||
<string name="alert_notsupported_text">This version is not supported anymore because of important updates. Please update to a new version of RiskAhead by using your marketplace.</string>
|
||||
<string name="later">Later</string>
|
||||
<string name="alert_notrecommended_title">Please update soon!</string>
|
||||
<string name="alert_notrecommended_text">There is a new version available in your marketplace. We still support your version but it is recommended to perform an update. The support of your version will end soon.</string>
|
||||
<string name="txt_reportlist_deleted">Deleted</string>
|
||||
<string name="txt_register_switchtologin">Already have an account? Login here!</string>
|
||||
</resources>
|
||||
@@ -247,70 +247,50 @@
|
||||
<string name="txt_language_title">Dili değiştir</string>
|
||||
|
||||
<string-array name="cat_situation_main">
|
||||
<item>Tehdit edici olay ya da durum</item>
|
||||
<item>Sözlü Şiddet</item>
|
||||
<item>Hafif-Ağır Fiziksel Şiddet</item>
|
||||
<item>Hayatı Tehdit Eden Şiddet</item>
|
||||
<item>Doğal Felaket</item>
|
||||
<item>İnsani Felaketler & Altyapı</item>
|
||||
<item>Threat</item>
|
||||
<item>Physical</item>
|
||||
<item>Life-Threatening</item>
|
||||
<item>Disaster</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_general">
|
||||
<item>Sahtecilik, Hırsızlık ya da Saldırı</item>
|
||||
<item>Madde Bağımlılığı, örn. alkol</item>
|
||||
<item>Gösteri, Ayaklanma ya da Yol Kapama</item>
|
||||
<item>Kontrol noktası, Kontroller</item>
|
||||
<item>Yolsuzluk, Haraca Bağlama</item>
|
||||
<item>Cürüm, Milis ya da Terör Faaliyetleri</item>
|
||||
<item>Diğer …</item>
|
||||
<string-array name="cat_situation_sub_threat">
|
||||
<item>Robbery</item>
|
||||
<item>Drug related</item>
|
||||
<item>Strike/Riot</item>
|
||||
<item>Checkpoint/Blockade</item>
|
||||
<item>Corruption/Extorsion</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_verbal">
|
||||
<item>Cinsel Taciz</item>
|
||||
<item>Hakaret ya da Tehditvari Dile Başvurma</item>
|
||||
<item>Sorgulama, Baskı ya da Zorlama</item>
|
||||
<item>Tahrik</item>
|
||||
<item>Diğer …</item>
|
||||
<string-array name="cat_situation_sub_physical">
|
||||
<item>Mugging</item>
|
||||
<item>Sexual Assault</item>
|
||||
<item>Physical Attack</item>
|
||||
<item>Fight</item>
|
||||
<item>Arrest/Capture</item>
|
||||
<item>Forced Labour</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force">
|
||||
<item>Cinsel Saldırı</item>
|
||||
<item>Fiziksel Saldırı</item>
|
||||
<item>Kavga ya da Arbede</item>
|
||||
<item>Tutuklama ya da Alıkoyma </item>
|
||||
<item>Zorunlu Çalışma</item>
|
||||
<item>Diğer …</item>
|
||||
<string-array name="cat_situation_sub_lifethreat">
|
||||
<item>Rape</item>
|
||||
<item>Kidnapping/Hostage</item>
|
||||
<item>Shooting</item>
|
||||
<item>Bombing</item>
|
||||
<item>Murder</item>
|
||||
<item>Dead body</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force_serious">
|
||||
<item>Tecavüz</item>
|
||||
<item>İşkence, Adam Kaçırma, Rehine Alma</item>
|
||||
<item>Ateş Açma</item>
|
||||
<item>Bomba ya da İntihar Saldırısı</item>
|
||||
<item>Cinayet, İnfaz</item>
|
||||
<item>CCesedin ya da ceset parçalarının gösterilmesi</item>
|
||||
<item>Diğer …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_nature">
|
||||
<item>Aşırı Sıcaklık</item>
|
||||
<item>Fırtına, Kasırga, Hortum</item>
|
||||
<item>Sel, Tsunami</item>
|
||||
<item>Deprem, Toprak Kayması</item>
|
||||
<item>Yangın, Duman, Volkanik Patlama</item>
|
||||
<item>Açlık, Kıtlık, Hayvan Vebası </item>
|
||||
<item>Başka …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_infrastructure">
|
||||
<item>Hava kirliliği</item>
|
||||
<item>Güç kesintisi ya da kaza</item>
|
||||
<item>Bina çökmesi ya da yıkımı</item>
|
||||
<item>Geniş alan yayılmış yangın</item>
|
||||
<item>Kimyasal felaket ya da petrol sızıntısı</item>
|
||||
<item>Felaket başlangıcı ya da epidemik</item>
|
||||
<item>Kaos, Anarşi</item>
|
||||
<item>Diğer …</item>
|
||||
<string-array name="cat_situation_sub_disaster">
|
||||
<item>Heat Wave</item>
|
||||
<item>Cyclone/Tornado</item>
|
||||
<item>Flood</item>
|
||||
<item>Earthquake</item>
|
||||
<item>Wild Fire</item>
|
||||
<item>Volcano</item>
|
||||
<item>Tsunami</item>
|
||||
<item>Fire</item>
|
||||
<item>Chemical/Oil Spill</item>
|
||||
<item>Epidemic</item>
|
||||
<item>Chaos/Anarchy</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_time_main">
|
||||
@@ -442,4 +422,11 @@
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
</string-array>
|
||||
<string name="alert_notsupported_title">Please update now!</string>
|
||||
<string name="alert_notsupported_text">This version is not supported anymore because of important updates. Please update to a new version of RiskAhead by using your marketplace.</string>
|
||||
<string name="later">Later</string>
|
||||
<string name="alert_notrecommended_title">Please update soon!</string>
|
||||
<string name="alert_notrecommended_text">There is a new version available in your marketplace. We still support your version but it is recommended to perform an update. The support of your version will end soon.</string>
|
||||
<string name="txt_reportlist_deleted">Deleted</string>
|
||||
<string name="txt_register_switchtologin">Already have an account? Login here!</string>
|
||||
</resources>
|
||||
@@ -1,8 +1,8 @@
|
||||
<resources>
|
||||
|
||||
<color name="bg_login">#c7c7c7</color>
|
||||
<color name="bg_register">#2e3237</color>
|
||||
|
||||
<color name="bg_login">#ffffff</color>
|
||||
<color name="bg_register">#ffffff</color>
|
||||
<color name="bg_report">#f5f5f5</color>
|
||||
|
||||
<color name="bg_common">#1175b7</color>
|
||||
|
||||
@@ -11,19 +11,21 @@
|
||||
|
||||
<color name="bg_common_2">#0461a8</color>
|
||||
<color name="common_text">#333333</color>
|
||||
<color name="actionbar_text">#fdfdfd</color>
|
||||
<color name="actionbar_text">#000000</color>
|
||||
|
||||
<color name="text_light_grey">#aa4b4b4b</color>
|
||||
|
||||
<color name="black">#000000</color>
|
||||
<color name="white">#f5f5f5</color>
|
||||
<color name="translucent">#609e9e9e</color>
|
||||
|
||||
|
||||
<color name="input_login">#222222</color>
|
||||
<color name="input_login_hint">#999999</color>
|
||||
<color name="input_register">#afafaf</color>
|
||||
<color name="input_login_hint">#5b5b5b</color>
|
||||
<color name="input_register">#181818</color>
|
||||
<color name="input_register_bg">#3b4148</color>
|
||||
<color name="input_register_hint">#8c9094</color>
|
||||
<color name="input_register_hint">#5b5b5b</color>
|
||||
<color name="btn_login_bg">#1175b7</color>
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -6,12 +6,12 @@
|
||||
<string name="btn_start_login">Login</string>
|
||||
<string name="btn_start_register">Register</string>
|
||||
|
||||
<string name="lbl_login_title">Log-in to RiskAhead</string>
|
||||
<string name="lbl_login_title">Log in</string>
|
||||
<string name="lbl_login_resendPW">Forgot your password? Click here</string>
|
||||
<string name="lbl_login_policy"><a href="https://www.riskahead.de/terms/">Terms of Service</a> and <a href="https://www.riskahead.de/privacy/">Privacy Policy</a></string>
|
||||
<string name="lbl_login_usesocialnet">Or use following social networks to sign in</string>
|
||||
|
||||
<string name="lbl_register_title">Register to RiskAhead</string>
|
||||
<string name="lbl_register_title">Register</string>
|
||||
<string name="input_register_name_hint">Username</string>
|
||||
<string name="input_register_email_hint">E-Mail</string>
|
||||
<string name="input_register_password_hint">Password</string>
|
||||
@@ -248,80 +248,61 @@
|
||||
<string name="txt_language_title">Change Language</string>
|
||||
<string name="alert_notsupported_title">Please update now!</string>
|
||||
<string name="alert_notsupported_text">This version is not supported anymore because of important updates. Please update to a new version of RiskAhead by using your marketplace.</string>
|
||||
<string name="update">Update</string>
|
||||
<string name="update" translatable="false">Update</string>
|
||||
<string name="later">Later</string>
|
||||
<string name="exit">Exit</string>
|
||||
<string name="exit" translatable="false">Exit</string>
|
||||
<string name="alert_notrecommended_title">Please update soon!</string>
|
||||
<string name="alert_notrecommended_text">There is a new version available in your marketplace. We still support your version but it is recommended to perform an update. The support of your version will end soon.</string>
|
||||
<string name="txt_about_dt" translatable="false">Dennis Thießen</string>
|
||||
<string name="txt_about_kg" translatable="false">Kevin-Chris Gründel</string>
|
||||
<string name="txt_reportlist_deleted">Deleted</string>
|
||||
<string name="txt_register_switchtologin">Already have an account? Login here!</string>
|
||||
|
||||
<string-array name="cat_situation_main">
|
||||
<item>A Threatening Incident or Situation</item>
|
||||
<item>Verbal Violence</item>
|
||||
<item>Light to Heavy Physical Violence</item>
|
||||
<item>Life-Threatening Violence</item>
|
||||
<item>Natural Disaster</item>
|
||||
<item>Human Disasters & Infrastructure</item>
|
||||
<item>Threat</item>
|
||||
<item>Physical</item>
|
||||
<item>Life-Threatening</item>
|
||||
<item>Disaster</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_general">
|
||||
<item>Fraud, Theft, Mugging or Burglary</item>
|
||||
<item>Drug Abuse eg Drink spiked</item>
|
||||
<item>Demonstration, Riot or Road Blockade</item>
|
||||
<item>Checkpoints, Controls</item>
|
||||
<item>Corruption, Extortion</item>
|
||||
<item>Crime, Militia or Terrorist Activities</item>
|
||||
<item>Other …</item>
|
||||
<string-array name="cat_situation_sub_threat">
|
||||
<item>Robbery</item>
|
||||
<item>Drug related</item>
|
||||
<item>Strike/Riot</item>
|
||||
<item>Checkpoint/Blockade</item>
|
||||
<item>Corruption/Extorsion</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_verbal">
|
||||
<item>Sexual Harassment</item>
|
||||
<item>Insulting or Threatening Language</item>
|
||||
<item>Interrogation, Pressuring or Coercing</item>
|
||||
<item>Incitement</item>
|
||||
<item>Other …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force">
|
||||
<string-array name="cat_situation_sub_physical">
|
||||
<item>Mugging</item>
|
||||
<item>Sexual Assault</item>
|
||||
<item>Physical Attack in general</item>
|
||||
<item>A Fight or Brawl</item>
|
||||
<item>Arrest or Capture </item>
|
||||
<item>Physical Attack</item>
|
||||
<item>Fight</item>
|
||||
<item>Arrest/Capture</item>
|
||||
<item>Forced Labour</item>
|
||||
<item>Other …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_force_serious">
|
||||
<string-array name="cat_situation_sub_lifethreat">
|
||||
<item>Rape</item>
|
||||
<item>Torture, Kidnapping, Hostage-Taking</item>
|
||||
<item>Kidnapping/Hostage</item>
|
||||
<item>Shooting</item>
|
||||
<item>Bomb or Suicide Attack</item>
|
||||
<item>Murder, Public Execution</item>
|
||||
<item>Display of Corpse or Corpse Parts </item>
|
||||
<item>Other …</item>
|
||||
<item>Bombing</item>
|
||||
<item>Murder</item>
|
||||
<item>Dead body</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_nature">
|
||||
<item>Extreme Temperaturs</item>
|
||||
<item>Storm, Hurricane, Tornado</item>
|
||||
<item>Flooding, Tsunami</item>
|
||||
<item>Earthquake, Landslide</item>
|
||||
<item>Fire, Smoke, Volcanic Eruption</item>
|
||||
<item>Famine, Drought, Animal Plague </item>
|
||||
<item>Other …</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_situation_sub_infrastructure">
|
||||
<item>Air Pollution</item>
|
||||
<item>Power Failure or General Accident</item>
|
||||
<item>Collapsing Buildings or Destruction</item>
|
||||
<item>Widespread Fire</item>
|
||||
<item>Chemical Disaster or Oil Spill</item>
|
||||
<item>Disease Outbreak or Epidemic</item>
|
||||
<item>Chaos, Anarchy</item>
|
||||
<item>Other …</item>
|
||||
<string-array name="cat_situation_sub_disaster">
|
||||
<item>Heat Wave</item>
|
||||
<item>Cyclone/Tornado</item>
|
||||
<item>Flood</item>
|
||||
<item>Earthquake</item>
|
||||
<item>Wild Fire</item>
|
||||
<item>Volcano</item>
|
||||
<item>Tsunami</item>
|
||||
<item>Fire</item>
|
||||
<item>Chemical/Oil Spill</item>
|
||||
<item>Epidemic</item>
|
||||
<item>Chaos/Anarchy</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="cat_time_main">
|
||||
@@ -365,7 +346,7 @@
|
||||
|
||||
<string-array name="cat_suspect_count">
|
||||
<item>Individual</item>
|
||||
<item>Small group(2-5)</item>
|
||||
<item>Small group(2–5)</item>
|
||||
<item>Large group (more than 5)</item>
|
||||
<item>I do not know</item>
|
||||
<item>Other …</item>
|
||||
|
||||
@@ -8,48 +8,28 @@
|
||||
<style name="MyRiskAheadTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:textViewStyle">@style/App_TextViewStyle</item>
|
||||
<item name="android:editTextStyle">@style/App_EditTextStyle</item>
|
||||
<!-- ...and here we setting appcompat’s color theme attrs -->
|
||||
<item name="colorPrimary">@color/bg_common</item>
|
||||
<item name="colorPrimaryDark">@color/bg_common_2</item>
|
||||
<item name="colorAccent">#02A8F3</item>
|
||||
</style>
|
||||
|
||||
<style name="MyRiskAheadToolbar" parent="Theme.AppCompat.NoActionBar">
|
||||
<!-- android:textColorPrimary is the color of the title text
|
||||
in the Toolbar, in the Theme.AppCompat theme: -->
|
||||
<item name="android:textColorPrimary">@color/actionbar_text</item>
|
||||
<item name="colorPrimary">@color/bg_common</item>
|
||||
<item name="colorPrimaryDark">@color/bg_common_2</item>
|
||||
<!-- android:textColorPrimaryInverse is the color of the title
|
||||
text in the Toolbar, in the Theme.AppCompat.Light theme: -->
|
||||
<!-- <item name="android:textColorPrimaryInverse">@color/abc_primary_text_material_light</item> -->
|
||||
|
||||
<!-- android:actionMenuTextColor is the color of the text of
|
||||
action (menu) items in the Toolbar, at least in the
|
||||
Theme.AppCompat theme.
|
||||
For some reason, they already get the textColorPrimary
|
||||
when running on API 21, but not on older versions of
|
||||
Android, so this is only necessary to support older
|
||||
Android versions.-->
|
||||
<item name="actionMenuTextColor">@color/abc_primary_text_material_light</item>
|
||||
<!-- android:textColorSecondary is the color of the menu
|
||||
overflow icon (three vertical dots) -->
|
||||
<item name="android:textColorSecondary">@color/actionbar_text</item>
|
||||
|
||||
<!-- This would set the toolbar's background color,
|
||||
but setting this also changes the popup menu's background,
|
||||
even if we define popupTheme for our <Toolbar> -->
|
||||
<!-- <item name="android:background">@color/color_primary</item> -->
|
||||
<style name="MyRiskAheadToolbar" parent="@style/Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:textColorPrimary">@color/bg_common</item>
|
||||
<item name="android:textColorSecondary">@color/bg_common</item>
|
||||
<item name="windowActionBarOverlay">true</item>
|
||||
<item name="actionMenuTextColor">@color/bg_common</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="App_EditTextStyle" parent="@android:style/Widget.EditText">
|
||||
<item name="android:textColor">@color/common_text</item>
|
||||
<item name="android:fontFamily" tools:targetApi="jelly_bean">sans-serif</item>
|
||||
<item name="android:textColor">@color/actionbar_text</item>
|
||||
</style>
|
||||
|
||||
<style name="App_TextViewStyle" parent="@android:style/Widget.TextView">
|
||||
<item name="android:textColor">@color/common_text</item>
|
||||
<item name="android:fontFamily" tools:targetApi="jelly_bean">sans-serif</item>
|
||||
<item name="android:textColor">@color/black</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
android:label="@string/app_name"
|
||||
android:hint="@string/search_hint"
|
||||
android:searchSettingsDescription="@string/search_settings"
|
||||
|
||||
android:searchSuggestAuthority="org.deke.risk.riskahead.helper.PlaceProvider"
|
||||
android:searchSuggestIntentAction="android.intent.action.VIEW"
|
||||
android:searchSuggestSelection=" ?"
|
||||
android:searchSuggestThreshold="2" >
|
||||
|
||||
</searchable>
|
||||
@@ -3,11 +3,14 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
maven {
|
||||
url 'https://maven.fabric.io/public' }
|
||||
maven {
|
||||
url 'https://maven.google.com/' }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.2.0'
|
||||
classpath 'com.google.gms:google-services:1.3.0-beta3'
|
||||
classpath 'com.android.tools.build:gradle:3.0.1'
|
||||
classpath 'com.google.gms:google-services:3.1.1'
|
||||
classpath 'io.fabric.tools:gradle:1.+'
|
||||
}
|
||||
}
|
||||
|
||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
#Wed Oct 05 22:20:11 CEST 2016
|
||||
#Mon Mar 19 20:32:10 CET 2018
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
|
||||
|
||||
Reference in New Issue
Block a user