Merge branch 'develop' into 'master'

Release 3.1.4

See merge request RiskAhead/RiskAhead-Android!3
This commit is contained in:
Dennis Thiessen
2018-07-16 22:10:01 +02:00
43 changed files with 439 additions and 413 deletions

View File

@@ -8,7 +8,7 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="riskAhead" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<module external.linked.project.id=":app" 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="android-gradle" name="Android-Gradle">
<configuration>
@@ -22,7 +22,7 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
<exclude-output />
@@ -96,17 +96,20 @@
<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-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/instant-run-apk" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-main-apk-res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaPrecompile" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifest-checker" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<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/processing-tools" />
<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/res_stripped" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/resources" />
<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" />
@@ -120,92 +123,87 @@
</content>
<orderEntry type="jdk" jdkName="Android API 27 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="com.google.firebase:firebase-crash-11.8.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.google.android.gms:play-services-auth-11.8.0" 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.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.google.firebase:firebase-appindexing-license-11.8.0" 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.google.android.gms:play-services-auth-api-phone-license-11.8.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.google.android.gms:play-services-auth-api-phone-11.8.0" 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.android.support:customtabs-27.1.0" 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.android.support:cardview-v7-27.1.0" 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="com.google.android.gms:play-services-auth-base-11.8.0" level="project" />
<orderEntry type="library" name="com.google.android.gms:play-services-auth-base-license-11.8.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.firebase:firebase-crash-license-11.8.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.firebase:firebase-appindexing-11.8.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" />
<orderEntry type="library" name="Gradle: com.android.support:support-v4-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.google.firebase:firebase-core-16.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-measurement-base-16.0.0" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-auth-api-phone-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-basement-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:common:1.1.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-auth-base-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.facebook.android:facebook-login-4.31.0" level="project" />
<orderEntry type="library" name="Gradle: com.crashlytics.sdk.android:crashlytics-core-2.6.3" level="project" />
<orderEntry type="library" name="Gradle: com.facebook.android:facebook-common-4.31.0" level="project" />
<orderEntry type="library" name="Gradle: com.beardedhen:androidbootstrap-2.3.2" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:customtabs-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.google.zxing:core:3.3.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-ads-base-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:recyclerview-v7-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-ads-lite-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-media-compat-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-core-ui-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.google.code.gson:gson:2.8.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.squareup.retrofit2:converter-gson:2.3.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.mikepenz:iconics-core-3.0.3" level="project" />
<orderEntry type="library" name="Gradle: com.mikepenz:materialdrawer-6.0.6" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-fragment-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.squareup.retrofit2:retrofit:2.3.0@jar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.core:runtime-1.1.0" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:design-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:appcompat-v7-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-ads-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.mikepenz:google-material-typeface-3.0.1.2.original" level="project" />
<orderEntry type="library" name="Gradle: io.fabric.sdk.android:fabric-1.4.3" level="project" />
<orderEntry type="library" name="Gradle: com.google.firebase:firebase-analytics-16.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.squareup.okhttp3:okhttp:3.8.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.crashlytics.sdk.android:beta-1.2.9" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-tasks-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-places-placereport-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.google.maps.android:android-maps-utils-0.5" level="project" />
<orderEntry type="library" name="Gradle: com.facebook.android:facebook-android-sdk-4.31.0" level="project" />
<orderEntry type="library" name="Gradle: com.google.firebase:firebase-analytics-impl-16.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.facebook.android:facebook-share-4.31.0" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime-1.1.0" level="project" />
<orderEntry type="library" name="Gradle: com.facebook.android:facebook-applinks-4.31.0" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:transition-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-plus-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-annotations:27.1.1@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:cardview-v7-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.parse.bolts:bolts-android:1.4.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:animated-vector-drawable-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-compat-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.parse.bolts:bolts-tasks:1.4.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-auth-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.squareup.okio:okio:1.13.0@jar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:viewmodel-1.1.0" level="project" />
<orderEntry type="library" name="Gradle: com.parse.bolts:bolts-applinks:1.4.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.mikepenz:fastadapter-extensions-expandable-3.2.4" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-base-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-vector-drawable-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.mcxiaoke.volley:library:1.0.19@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-core-utils-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-gass-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.facebook.android:facebook-core-4.31.0" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-gcm-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-ads-identifier-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.mikepenz:fastadapter-3.2.4" level="project" />
<orderEntry type="library" name="Gradle: com.google.firebase:firebase-measurement-connector-impl-16.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.mikepenz:materialize-1.1.2" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-location-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.twitter.sdk.android:twitter-core-3.3.0" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-stats-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.google.firebase:firebase-iid-16.0.0" level="project" />
<orderEntry type="library" name="Gradle: com.google.firebase:firebase-iid-interop-16.0.0" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-maps-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-iid-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.facebook.android:facebook-places-4.31.0" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata-core-1.1.0" level="project" />
<orderEntry type="library" name="Gradle: com.crashlytics.sdk.android:crashlytics-2.9.4" level="project" />
<orderEntry type="library" name="Gradle: com.google.firebase:firebase-measurement-connector-16.0.0" level="project" />
<orderEntry type="library" name="Gradle: com.google.firebase:firebase-common-16.0.0" level="project" />
<orderEntry type="library" name="Gradle: android.arch.core:common:1.1.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-audience-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.crashlytics.sdk.android:answers-1.4.2" level="project" />
<orderEntry type="library" name="Gradle: com.facebook.android:facebook-messenger-4.31.0" level="project" />
<orderEntry type="library" name="Gradle: android-android-27" level="project" />
</component>
</module>

View File

@@ -7,10 +7,10 @@ android {
defaultConfig {
applicationId "org.deke.risk.riskahead"
minSdkVersion 15
targetSdkVersion 25
versionCode 44
versionName "3.1.1"
minSdkVersion 19
targetSdkVersion 26
versionCode 48
versionName "3.1.4"
}
buildTypes {
release {
@@ -26,6 +26,10 @@ android {
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
repositories {
@@ -35,39 +39,41 @@ repositories {
}
dependencies {
implementation 'com.google.firebase:firebase-crash:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-appindexing:11.8.0'
compile fileTree(dir: 'libs', include: 'Parse-*.jar')
implementation 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') {
implementation('com.twitter.sdk.android:twitter-core:3.3.0@aar') {
transitive = true
}
implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') {
transitive = true
}
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') {
implementation('com.mikepenz:materialdrawer:6.0.6@aar') {
transitive = true
}
implementation 'com.android.support:customtabs:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
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'
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
compile 'com.google.android.gms:play-services-auth:11.8.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'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
implementation 'com.google.android.gms:play-services-plus:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
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'
implementation 'com.google.maps.android:android-maps-utils:0.5'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.beardedhen:androidbootstrap:2.3.2'
implementation 'com.mcxiaoke.volley:library:1.0.19'
implementation 'com.google.firebase:firebase-core:16.0.1'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.gms.google-services'

View File

@@ -25,8 +25,13 @@
-keep class com.android.volley.** { *; }
-dontwarn com.android.volley.**
# Hide warnings about references to newer platforms in the library
-dontwarn android.support.v7.**
# don't process support library
-keep class android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }
-dontwarn android.support.v7.**
# Settings for Crashlytics
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception
-keep class com.crashlytics.** { *; }
-dontwarn com.crashlytics.**

Binary file not shown.

View File

@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":44},"path":"app-release.apk","properties":{"packageId":"org.deke.risk.riskahead","split":"","minSdkVersion":"15"}}]
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":48,"versionName":"3.1.4","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

View File

@@ -38,9 +38,6 @@
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyALm-1lEf5xualfyHdmNEdAsXlbwOQhbI8" />
<meta-data
android:name="io.fabric.ApiKey"
android:value="c44233e93b0a9702b00bd632380572d758096e3c" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />

View File

@@ -44,7 +44,7 @@ import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.beardedhen.androidbootstrap.BootstrapButton;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import java.util.HashMap;
import java.util.Map;
@@ -105,7 +105,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
if(connectivityManager != null){
activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get connectivityManager");
Crashlytics.log(Log.ERROR, TAG, "Could not get connectivityManager");
}
if(activeNetworkInfo == null){
@@ -309,8 +309,8 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
}
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
}, new Response.ErrorListener() {
@@ -365,8 +365,8 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
}
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
}, new Response.ErrorListener() {
@@ -384,8 +384,8 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
try {
versionCode = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;
} catch (PackageManager.NameNotFoundException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
params.put("version", Integer.toString(versionCode));
@@ -559,12 +559,12 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
finish();
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error at social media login (Server returned error): " + errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error at social media login (Server returned error): " + errorMsg);
Toast.makeText(getApplicationContext(), getResources().getString(R.string.txt_errormsg_login)+getResources().getString(R.string.txt_errormsg_suffix), Toast.LENGTH_LONG).show();
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
@@ -572,7 +572,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Social Media Login Error: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Social Media Login Error: " + error.getMessage());
Toast.makeText(getApplicationContext(), getResources().getString(R.string.txt_errormsg_login)+getResources().getString(R.string.txt_errormsg_suffix), Toast.LENGTH_LONG).show();
hideDialog();
}
@@ -666,19 +666,19 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
}
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error at login (Server returned error): " + errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error at login (Server returned error): " + errorMsg);
Toast.makeText(getApplicationContext(), getResources().getString(R.string.txt_errormsg_login), Toast.LENGTH_LONG).show();
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Login Error: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Login Error: " + error.getMessage());
Toast.makeText(getApplicationContext(), getResources().getString(R.string.txt_errormsg_login), Toast.LENGTH_LONG).show();
hideDialog();
}
@@ -718,19 +718,19 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error occured: "+errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error occured: "+errorMsg);
Toast.makeText(getApplicationContext(), getResources().getString(R.string.txt_errormsg_register), Toast.LENGTH_LONG).show();
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Exception caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Exception caught");
Crashlytics.logException(e);
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Registration Error: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Registration Error: " + error.getMessage());
Toast.makeText(getApplicationContext(),
getResources().getString(R.string.txt_errormsg_register), Toast.LENGTH_LONG).show();
hideDialog();
@@ -768,19 +768,19 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error occured: "+errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error occured: "+errorMsg);
Toast.makeText(getApplicationContext(), getResources().getString(R.string.txt_errormsg_register), Toast.LENGTH_LONG).show();
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Registration Error: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Registration Error: " + error.getMessage());
Toast.makeText(getApplicationContext(),
getResources().getString(R.string.txt_errormsg_register), Toast.LENGTH_LONG).show();
hideDialog();
@@ -933,13 +933,13 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
showMessage(getString(R.string.alert_passwordreset_confirmation));
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Reset PW returned error value: "+errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Reset PW returned error value: "+errorMsg);
Toast.makeText(getApplicationContext(),
getResources().getString(R.string.txt_errormsg_getpwreset), Toast.LENGTH_LONG).show();
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
@@ -947,7 +947,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "E-Mail pw resend Error: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "E-Mail pw resend Error: " + error.getMessage());
Toast.makeText(getApplicationContext(),
getResources().getString(R.string.txt_errormsg_getpwreset), Toast.LENGTH_LONG).show();
hideDialog();
@@ -977,13 +977,13 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
boolean error = jObj.getBoolean("error");
if (error) {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG,"Resend E-Mail returned error value: "+errorMsg);
Crashlytics.log(Log.ERROR, TAG,"Resend E-Mail returned error value: "+errorMsg);
Toast.makeText(getApplicationContext(),
getResources().getString(R.string.txt_errormsg_getactivationlink) + ":"+errorMsg, Toast.LENGTH_LONG).show();
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
@@ -991,7 +991,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "E-Mail pw resend error: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "E-Mail pw resend error: " + error.getMessage());
Toast.makeText(getApplicationContext(),
getResources().getString(R.string.txt_errormsg_getactivationlink), Toast.LENGTH_LONG).show();
hideDialog();
@@ -1037,19 +1037,19 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
.show();
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error occured: "+errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error occured: "+errorMsg);
Toast.makeText(getApplicationContext(), getResources().getString(R.string.txt_errormsg_register), Toast.LENGTH_LONG).show();
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Registration Error: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Registration Error: " + error.getMessage());
Toast.makeText(getApplicationContext(),
getResources().getString(R.string.txt_errormsg_register), Toast.LENGTH_LONG).show();
hideDialog();

View File

@@ -22,12 +22,16 @@ import android.support.v7.widget.SearchView;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.RatingBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.crashlytics.android.Crashlytics;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;
@@ -47,7 +51,6 @@ import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;
import com.google.android.gms.maps.model.TileOverlay;
import com.google.android.gms.maps.model.TileOverlayOptions;
import com.google.firebase.crash.FirebaseCrash;
import com.google.maps.android.clustering.Cluster;
import com.google.maps.android.clustering.ClusterManager;
import com.google.maps.android.heatmaps.HeatmapTileProvider;
@@ -123,7 +126,6 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
super.onCreate(savedInstanceState);
userHasToBeLoggedIn();
if (session.getSubsPremium()) {
MIN_ZOOM_LEVEL = 7;
} else {
@@ -376,8 +378,8 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
try {
mClusterManager.addItem(new IncidentReport(incidents.getJSONObject(i)));
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
@@ -399,8 +401,8 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
try {
heatMapPositions.add(new WeightedLatLng(new LatLng(incidents.getJSONObject(i).getDouble("latitude"), incidents.getJSONObject(i).getDouble("longitude")), 1.0));
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
@@ -435,11 +437,13 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
addIncidentMarkersOnHeatMap(incidents);
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error getting map heat map positions (server returned error): " + errorMsg);
int loglevel = errorMsg.contains("Could not retrieve incidents from bound") ? Log.INFO : Log.ERROR;
Crashlytics.log(loglevel, TAG, "Error getting map heat map positions (server returned error): " + errorMsg);
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
@@ -447,7 +451,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
@Override
public void onErrorResponse(VolleyError error) {
hideProgress();
FirebaseCrash.logcat(Log.ERROR, TAG, "Error getting map positions: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error getting map positions: " + error.getMessage());
handleVolleyErrorResponse();
}
}) {
@@ -483,11 +487,11 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
addIncidentMarkersOnMap(incidents);
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.INFO, TAG, "Error getting map positions (server returned error): " + errorMsg);
Crashlytics.log(Log.INFO, TAG, "Error getting map positions (server returned error): " + errorMsg);
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
@@ -495,7 +499,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
@Override
public void onErrorResponse(VolleyError error) {
hideProgress();
FirebaseCrash.logcat(Log.ERROR, TAG, "Error getting map positions: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error getting map positions: " + error.getMessage());
showMessage(getString(R.string.errormsg_couldnotretrieve));
}
}) {
@@ -579,8 +583,8 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
showMessage(getResources().getString(R.string.txt_errormsg_getinfowindow));
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
@@ -588,7 +592,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
@Override
public void onErrorResponse(VolleyError error) {
hideProgress();
FirebaseCrash.logcat(Log.ERROR, TAG, "Error getting incident details: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error getting incident details: " + error.getMessage());
handleVolleyErrorResponse();
}
}) {
@@ -792,7 +796,6 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
locationListener = new MyLocationListener();
try {
if (!isLocationEnabled()) {
showMessage("Please activate GPS in your android settings.");
Log.d(TAG, "Locationservice not enabled");
@@ -832,11 +835,10 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
}
mMap.moveCamera(CameraUpdateFactory.newLatLng(myLocation));
}
} catch (Exception e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Exception caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Exception caught");
Crashlytics.logException(e);
}
}
@@ -876,7 +878,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
txtSearch.setHintTextColor(Color.DKGRAY);
txtSearch.setTextColor(Color.BLACK);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get searchManager");
Crashlytics.log(Log.ERROR, TAG, "Could not get searchManager");
}
return true;

View File

@@ -30,7 +30,7 @@ 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.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import com.google.gson.Gson;
import org.deke.risk.riskahead.fragment.BaseReportWFFragment;
@@ -215,8 +215,8 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
}
} catch (IOException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
incident.setIncidentPositionDescription("Latitude: " + latlngpos.latitude + "\nLongitude: " + latlngpos.longitude);
}
}
@@ -331,12 +331,12 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
showShareDialog(incident);
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error adding incident (Server returned error): " + errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error adding incident (Server returned error): " + errorMsg);
showMessage(getResources().getString(R.string.txt_errormsg_createincident));
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
hideDialog();
@@ -344,7 +344,7 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Error adding incident: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error adding incident: " + error.getMessage());
handleVolleyErrorResponse();
hideDialog();
}

View File

@@ -21,7 +21,7 @@ import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.adapter.SubscriptionsPagerAdapter;
import org.deke.risk.riskahead.fragment.SubscriptionItemFragment;
@@ -193,8 +193,8 @@ public class SubscriptionsActivity extends BaseActivity{
}
} catch (RemoteException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "RemoteException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "RemoteException caught");
Crashlytics.logException(e);
}
}
@@ -254,7 +254,7 @@ public class SubscriptionsActivity extends BaseActivity{
Log.d(TAG,"Product: "+sku+" Price: "+price+" Title: "+title+" Description: "+description);
}
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get responseList");
Crashlytics.log(Log.ERROR, TAG, "Could not get responseList");
}
((SubscriptionItemFragment) subscriptionsAdapter.getItem(0)).initSubscription(purchaseMap.get("no_ads_03"));
@@ -262,8 +262,8 @@ public class SubscriptionsActivity extends BaseActivity{
}
} catch (Exception e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Exception caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Exception caught");
Crashlytics.logException(e);
}
}
@@ -278,8 +278,8 @@ public class SubscriptionsActivity extends BaseActivity{
startIntentSenderForResult(pendingIntent.getIntentSender(),1001, new Intent(), 0, 0, 0);
}
} catch (Exception e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Exception caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Exception caught");
Crashlytics.logException(e);
}
}
@@ -302,8 +302,8 @@ public class SubscriptionsActivity extends BaseActivity{
}
catch (JSONException e) {
showMessage(getResources().getString(R.string.txt_errormsg_subs));
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught while purchasing!");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught while purchasing!");
Crashlytics.logException(e);
}
}
}
@@ -328,15 +328,15 @@ public class SubscriptionsActivity extends BaseActivity{
if (error) {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error adding subscription (Server returned error): " + errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error adding subscription (Server returned error): " + errorMsg);
showMessage(getResources().getString(R.string.txt_errormsg_subs));
} else {
gotoSubscriptionsActivity();
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
hideDialog();
@@ -345,7 +345,7 @@ public class SubscriptionsActivity extends BaseActivity{
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Error adding subscription: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error adding subscription: " + error.getMessage());
showMessage(getResources().getString(R.string.txt_errormsg_subs));
hideDialog();
}
@@ -400,15 +400,15 @@ public class SubscriptionsActivity extends BaseActivity{
syncWithDatabase(ownedSkus);
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Error getting subscription: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error getting subscription: " + error.getMessage());
handleVolleyErrorResponse();
}
}) {
@@ -445,21 +445,21 @@ public class SubscriptionsActivity extends BaseActivity{
if (error) {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error deactivating subscription (Server returned error): " + errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error deactivating subscription (Server returned error): " + errorMsg);
}else{
Log.d(TAG,"Sub with uid: "+subscriptionId+" deactivated in DB");
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Error deactivating subscription: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error deactivating subscription: " + error.getMessage());
}
}) {

View File

@@ -20,7 +20,7 @@ import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.beardedhen.androidbootstrap.AwesomeTextView;
import com.beardedhen.androidbootstrap.BootstrapLabel;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import com.mikepenz.google_material_typeface_library.GoogleMaterial;
import com.mikepenz.iconics.IconicsDrawable;
@@ -174,19 +174,19 @@ public class ViewReportActivity extends BaseActivity {
gotoProfileActivity();
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error deleting incident (Server returned error): " + errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error deleting incident (Server returned error): " + errorMsg);
showMessage(getResources().getString(R.string.txt_errormsg_deleteincident));
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Error deleting incident: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error deleting incident: " + error.getMessage());
handleVolleyErrorResponse();
hideDialog();
}
@@ -232,19 +232,19 @@ public class ViewReportActivity extends BaseActivity {
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error get incident (Server returned error): " + errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error get incident (Server returned error): " + errorMsg);
showMessage(getResources().getString(R.string.txt_errormsg_getincidentdetail));
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Error get incident: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error get incident: " + error.getMessage());
handleVolleyErrorResponse();
hideDialog();
}
@@ -397,8 +397,8 @@ public class ViewReportActivity extends BaseActivity {
txtPosition.setText(sb.toString());
}
} catch (IOException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "IOException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "IOException caught");
Crashlytics.logException(e);
}
final String latitude = Double.toString(incident.getPosition().latitude);
@@ -466,19 +466,19 @@ public class ViewReportActivity extends BaseActivity {
checkVotetypeAndSetVoteButtons(jPoints);
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error voting incident (Server returned error): " + errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error voting incident (Server returned error): " + errorMsg);
showMessage(getResources().getString(R.string.txt_errormsg_couldnotvote));
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Error voting incident: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error voting incident: " + error.getMessage());
handleVolleyErrorResponse();
}
}) {
@@ -520,18 +520,18 @@ public class ViewReportActivity extends BaseActivity {
checkVotetypeAndSetVoteButtons(jPoints);
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error deleting voting incident (Server returned error): " + errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error deleting voting incident (Server returned error): " + errorMsg);
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Error deleting voting incident: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error deleting voting incident: " + error.getMessage());
handleVolleyErrorResponse();
}
}) {

View File

@@ -14,7 +14,7 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.R;
import org.deke.risk.riskahead.helper.IncidentReport;
@@ -79,8 +79,8 @@ public class ReportListAdapter extends BaseAdapter {
status = false;
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
if(!status){

View File

@@ -9,7 +9,7 @@ import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.R;
import org.json.JSONException;
@@ -74,8 +74,8 @@ public class Top10ListAdapter extends BaseAdapter {
numberOfIncidents.setText(data.get(position).getString("numberOfPosts")+" "+context.getResources().getString(R.string.txt_top10_reportedinc));
memberSince.setText(context.getResources().getString(R.string.txt_top10_membersince)+" "+data.get(position).getString("created_at").split(" ")[0]);
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
return vi;
}

View File

@@ -13,6 +13,7 @@ import android.view.View.OnClickListener;
import android.view.ViewGroup;
import com.beardedhen.androidbootstrap.BootstrapButton;
import com.crashlytics.android.Crashlytics;
import com.facebook.AccessToken;
import com.facebook.CallbackManager;
import com.facebook.FacebookCallback;
@@ -22,7 +23,6 @@ import com.facebook.GraphResponse;
import com.facebook.login.LoginBehavior;
import com.facebook.login.LoginManager;
import com.facebook.login.LoginResult;
import com.google.firebase.crash.FirebaseCrash;
import org.deke.risk.riskahead.LoginActivity;
import org.deke.risk.riskahead.R;
@@ -99,7 +99,7 @@ public class FacebookButtonFragment extends Fragment {
if(activity != null){
LoginManager.getInstance().logInWithReadPermissions(activity, Arrays.asList("public_profile", "email"));
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get activity when initializing the facebook button");
Crashlytics.log(Log.ERROR, TAG, "Could not get activity when initializing the facebook button");
}
}
});
@@ -118,7 +118,7 @@ public class FacebookButtonFragment extends Fragment {
if(activity != null){
activity.showMessage("Facebook LogIn canceled. Please use E-Mail instead.");
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get activity for showing onCancel message");
Crashlytics.log(Log.ERROR, TAG, "Could not get activity for showing onCancel message");
}
}
@@ -129,7 +129,7 @@ public class FacebookButtonFragment extends Fragment {
if(activity != null){
activity.showMessage("Could not log in with Facebook. Please use E-Mail instead or try again later.");
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get activity for showing onError message");
Crashlytics.log(Log.ERROR, TAG, "Could not get activity for showing onError message");
}
}
});
@@ -144,11 +144,11 @@ public class FacebookButtonFragment extends Fragment {
if(activity != null){
activity.handleSocialMediaLogin(objects.getString("id"), "facebook", objects.getString("first_name"), objects.getString("email"));
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get activity for handleSocialMediaLogin");
Crashlytics.log(Log.ERROR, TAG, "Could not get activity for handleSocialMediaLogin");
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Exception caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Exception caught");
Crashlytics.logException(e);
}
}
});

View File

@@ -11,13 +11,13 @@ import android.view.View;
import android.view.ViewGroup;
import com.beardedhen.androidbootstrap.BootstrapButton;
import com.crashlytics.android.Crashlytics;
import com.google.android.gms.auth.api.signin.GoogleSignIn;
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
import com.google.android.gms.auth.api.signin.GoogleSignInClient;
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
import com.google.android.gms.common.api.ApiException;
import com.google.android.gms.tasks.Task;
import com.google.firebase.crash.FirebaseCrash;
import org.deke.risk.riskahead.LoginActivity;
import org.deke.risk.riskahead.R;
@@ -46,7 +46,7 @@ public class GooglePlusButtonFragment extends Fragment{
if(mActivity != null){
mContext = mActivity.getApplicationContext();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not retrieve activity for Google+ onCreate Method");
Crashlytics.log(Log.ERROR, TAG, "Could not retrieve activity for Google+ onCreate Method");
}
}
@@ -88,7 +88,7 @@ public class GooglePlusButtonFragment extends Fragment{
if(account != null){
mActivity.handleSocialMediaLogin(account.getId(),"google",account.getDisplayName(),account.getEmail());
}else{
FirebaseCrash.logcat(Log.ERROR, TAG,"Could not handle G+ SignIn Result");
Crashlytics.log(Log.ERROR, TAG,"Could not handle G+ SignIn Result");
}
}
}
@@ -97,7 +97,7 @@ public class GooglePlusButtonFragment extends Fragment{
try {
return completedTask.getResult(ApiException.class);
} catch (ApiException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "signInResult:failed code=" + e.getStatusCode());
Crashlytics.log(Log.ERROR, TAG, "signInResult:failed code=" + e.getStatusCode());
return null;
}
}

View File

@@ -14,7 +14,8 @@ import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.beardedhen.androidbootstrap.BootstrapButton;
import com.beardedhen.androidbootstrap.api.defaults.DefaultBootstrapBrand;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.ProfileActivity;
import org.deke.risk.riskahead.R;
@@ -76,7 +77,7 @@ public class ProfileStatisticsFragment extends Fragment {
uid = getArguments().getString("uid",parent.user.get(SessionManager.KEY_UID));
getProfileStatsForList();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not retrieve arguments");
Crashlytics.log(Log.ERROR, TAG, "Could not retrieve arguments");
}
return view;
@@ -91,7 +92,7 @@ public class ProfileStatisticsFragment extends Fragment {
String tag_string_req = "req_profilestats";
AppController.getInstance().addToRequestQueue(strReq, tag_string_req);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not retrieve activity for ProfileStats");
Crashlytics.log(Log.ERROR, TAG, "Could not retrieve activity for ProfileStats");
}
}
@@ -149,7 +150,7 @@ public class ProfileStatisticsFragment extends Fragment {
activity.session.setSubsPremium(false);
}
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not retrieve activity for ProfileStatistics. Could not set statusLevel");
Crashlytics.log(Log.ERROR, TAG, "Could not retrieve activity for ProfileStatistics. Could not set statusLevel");
}
}
@@ -161,28 +162,28 @@ public class ProfileStatisticsFragment extends Fragment {
}
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error getting user stats (server returned error): " + errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error getting user stats (server returned error): " + errorMsg);
parent.showMessage(getResources().getString(R.string.txt_errormsg_retrievestats));
}
((ProfileActivity)getActivity()).hideDialog();
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Error getting user stats: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error getting user stats: " + error.getMessage());
ProfileActivity activity = (ProfileActivity) getActivity();
if(activity != null){
activity.hideDialog();
activity.handleVolleyErrorResponse();
}else {
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not retrieve activity for onErrorResponse");
Crashlytics.log(Log.ERROR, TAG, "Could not retrieve activity for onErrorResponse");
}
}
}) {

View File

@@ -14,7 +14,8 @@ import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.ProfileActivity;
import org.deke.risk.riskahead.R;
@@ -58,7 +59,7 @@ public class ReportListFragment extends Fragment{
if(arguments != null && parent != null){
uid = getArguments().getString("uid",parent.user.get(SessionManager.KEY_UID));
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could either not get arguments or parent activity");
Crashlytics.log(Log.ERROR, TAG, "Could either not get arguments or parent activity");
}
myListView = view.findViewById(R.id.lv_reportlist_list);
@@ -73,8 +74,8 @@ public class ReportListFragment extends Fragment{
parent.gotoViewReportActivity(resultList.get(position).getInt("id"));
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Catched JSONException");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Catched JSONException");
Crashlytics.logException(e);
}
}
});
@@ -91,7 +92,7 @@ public class ReportListFragment extends Fragment{
StringRequest strReq = getStringRequestGetIncidentsWithPositionFromUserID();
AppController.getInstance().addToRequestQueue(strReq, tag_string_req);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent activity");
}
}
@@ -124,25 +125,25 @@ public class ReportListFragment extends Fragment{
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error getting incident list (Server returned error): " + errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error getting incident list (Server returned error): " + errorMsg);
}
ProfileActivity activity = (ProfileActivity) getActivity();
if(activity != null){
activity.hideDialog();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent activity");
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Catched JSONException");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Catched JSONException");
Crashlytics.logException(e);
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Error getting incident list: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error getting incident list: " + error.getMessage());
parent.handleVolleyErrorResponse();
parent.hideDialog();
}

View File

@@ -13,7 +13,7 @@ import android.widget.RelativeLayout;
import android.widget.Spinner;
import android.widget.TextView;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.R;
import org.deke.risk.riskahead.ReportWFActivity;
@@ -88,7 +88,7 @@ public class ReportWF_1_Fragment extends BaseReportWFFragment{
if(activity != null){
activity.setMapButtonVisibility(false);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent activity");
}
@@ -162,7 +162,7 @@ public class ReportWF_1_Fragment extends BaseReportWFFragment{
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(activity, stringId, android.R.layout.simple_spinner_dropdown_item);
crimeCategory.setAdapter(new SpinnerHintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, activity));
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent activity");
}
}
@@ -200,7 +200,7 @@ public class ReportWF_1_Fragment extends BaseReportWFFragment{
if(activity != null){
incident = activity.getIncident();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent activity");
}
if(incident != null){
@@ -242,7 +242,7 @@ public class ReportWF_1_Fragment extends BaseReportWFFragment{
if(activity != null){
activity.setIncident(incident);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent activity");
}
}

View File

@@ -22,7 +22,7 @@ import android.widget.RelativeLayout;
import android.widget.Spinner;
import android.widget.TimePicker;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.R;
import org.deke.risk.riskahead.ReportWFActivity;
@@ -186,7 +186,7 @@ public class ReportWF_2_Fragment extends BaseReportWFFragment {
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(getActivity(), stringId , android.R.layout.simple_spinner_dropdown_item);
timeCategory.setAdapter(new SpinnerHintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, getActivity()));
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent activity");
}
}
@@ -307,7 +307,7 @@ public class ReportWF_2_Fragment extends BaseReportWFFragment {
timePickerFragment.show(fm, "Pick Time");
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get FragmentManager");
Crashlytics.log(Log.ERROR, TAG, "Could not get FragmentManager");
}
}
@@ -333,19 +333,19 @@ public class ReportWF_2_Fragment extends BaseReportWFFragment {
tmpIsToDate = false;
return tmpDialog;
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
} catch (ParseException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Exception caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Exception caught");
Crashlytics.logException(e);
}
}
if(activity != null) {
return new DatePickerDialog(activity, this, year, month, day);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity and therefore trying again to retrieve parent");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity and therefore trying again to retrieve parent");
return new DatePickerDialog(getActivity(),this, year, month, day);
}
}
@@ -366,7 +366,7 @@ public class ReportWF_2_Fragment extends BaseReportWFFragment {
datePickerFragment.show(fm, "Pick Date");
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get FragmentManager");
Crashlytics.log(Log.ERROR, TAG, "Could not get FragmentManager");
}
}
@@ -413,7 +413,7 @@ public class ReportWF_2_Fragment extends BaseReportWFFragment {
if(activity != null){
incident = activity.getIncident();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not retrieve parent activity");
Crashlytics.log(Log.ERROR, TAG, "Could not retrieve parent activity");
}
@@ -481,7 +481,7 @@ public class ReportWF_2_Fragment extends BaseReportWFFragment {
if(activity != null){
activity.setIncident(incident);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}

View File

@@ -11,7 +11,7 @@ import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.Spinner;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.R;
import org.deke.risk.riskahead.ReportWFActivity;
@@ -154,7 +154,7 @@ public class ReportWF_3_Fragment extends BaseReportWFFragment {
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(activity,stringId, android.R.layout.simple_spinner_dropdown_item);
suspectCategory.setAdapter(new SpinnerHintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, activity));
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}
@@ -188,7 +188,7 @@ public class ReportWF_3_Fragment extends BaseReportWFFragment {
if(activity != null){
incident = activity.getIncident();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
if(incident != null){
@@ -216,7 +216,7 @@ public class ReportWF_3_Fragment extends BaseReportWFFragment {
if(activity != null){
activity.setIncident(incident);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}

View File

@@ -11,7 +11,7 @@ import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.Spinner;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.R;
import org.deke.risk.riskahead.ReportWFActivity;
@@ -118,7 +118,7 @@ public class ReportWF_4_Fragment extends BaseReportWFFragment {
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(activity, stringId, android.R.layout.simple_spinner_dropdown_item);
suspectWeapon.setAdapter(new SpinnerHintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, activity));
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}
@@ -143,7 +143,7 @@ public class ReportWF_4_Fragment extends BaseReportWFFragment {
if(activity != null){
incident = activity.getIncident();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
if(incident != null){
@@ -169,7 +169,7 @@ public class ReportWF_4_Fragment extends BaseReportWFFragment {
if(activity != null){
activity.setIncident(incident);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}

View File

@@ -11,7 +11,7 @@ import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.Spinner;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.R;
import org.deke.risk.riskahead.ReportWFActivity;
@@ -113,7 +113,7 @@ public class ReportWF_5_Fragment extends BaseReportWFFragment {
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(activity, stringId, android.R.layout.simple_spinner_dropdown_item);
suspectCount.setAdapter(new SpinnerHintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, activity));
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}
@@ -136,7 +136,7 @@ public class ReportWF_5_Fragment extends BaseReportWFFragment {
if(activity != null){
incident = activity.getIncident();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
if(incident != null){
@@ -162,7 +162,7 @@ public class ReportWF_5_Fragment extends BaseReportWFFragment {
if(activity != null){
activity.setIncident(incident);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}

View File

@@ -10,7 +10,7 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.R;
import org.deke.risk.riskahead.ReportWFActivity;
@@ -99,7 +99,7 @@ public class ReportWF_6_Fragment extends BaseReportWFFragment {
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(activity, stringId, android.R.layout.simple_spinner_dropdown_item);
victimType.setAdapter(new SpinnerHintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, activity));
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}
@@ -121,7 +121,7 @@ public class ReportWF_6_Fragment extends BaseReportWFFragment {
if(activity != null){
incident = activity.getIncident();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
if(incident != null){
@@ -145,7 +145,7 @@ public class ReportWF_6_Fragment extends BaseReportWFFragment {
if(activity != null){
activity.setIncident(incident);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}

View File

@@ -11,7 +11,7 @@ import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.Spinner;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.R;
import org.deke.risk.riskahead.ReportWFActivity;
@@ -110,7 +110,7 @@ public class ReportWF_7_Fragment extends BaseReportWFFragment {
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(activity, stringId, android.R.layout.simple_spinner_dropdown_item);
victimOrigin.setAdapter(new SpinnerHintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, activity));
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}
@@ -133,7 +133,7 @@ public class ReportWF_7_Fragment extends BaseReportWFFragment {
if(activity != null){
incident = activity.getIncident();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
if(incident != null){
@@ -159,7 +159,7 @@ public class ReportWF_7_Fragment extends BaseReportWFFragment {
if(activity != null){
activity.setIncident(incident);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}

View File

@@ -11,7 +11,7 @@ import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.Spinner;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.R;
import org.deke.risk.riskahead.ReportWFActivity;
@@ -151,7 +151,7 @@ public class ReportWF_8_Fragment extends BaseReportWFFragment {
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(activity, stringId, android.R.layout.simple_spinner_dropdown_item);
suspectVehicle.setAdapter(new SpinnerHintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, activity));
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}
@@ -206,7 +206,7 @@ public class ReportWF_8_Fragment extends BaseReportWFFragment {
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(activity, stringId, android.R.layout.simple_spinner_dropdown_item);
victimAffiliation.setAdapter(new SpinnerHintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, activity));
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}
@@ -255,7 +255,7 @@ public class ReportWF_8_Fragment extends BaseReportWFFragment {
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(activity, stringId, android.R.layout.simple_spinner_dropdown_item);
suspectRecongnition.setAdapter(new SpinnerHintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, activity));
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}
@@ -281,7 +281,7 @@ public class ReportWF_8_Fragment extends BaseReportWFFragment {
if(activity != null){
incident = activity.getIncident();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
if(incident != null){
@@ -323,7 +323,7 @@ public class ReportWF_8_Fragment extends BaseReportWFFragment {
if(activity != null){
activity.setIncident(incident);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}

View File

@@ -9,7 +9,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.R;
import org.deke.risk.riskahead.ReportWFActivity;
@@ -49,7 +49,7 @@ public class ReportWF_Finish_Fragment extends BaseReportWFFragment {
if(activity != null){
return activity.getIncident();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
return null;
}
}

View File

@@ -14,7 +14,7 @@ import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.R;
import org.deke.risk.riskahead.SettingsActivity;
@@ -258,12 +258,12 @@ public class SettingsFragment extends PreferenceFragment {
((SettingsActivity) getActivity()).showMessage(getString(R.string.alert_passwordreset_confirmation));
}else{
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error request email reset (Server returned error): " + errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error request email reset (Server returned error): " + errorMsg);
((SettingsActivity) getActivity()).showMessage(getResources().getString(R.string.txt_errormsg_resetpw));
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
@@ -271,7 +271,7 @@ public class SettingsFragment extends PreferenceFragment {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Error request email reset: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error request email reset: " + error.getMessage());
((SettingsActivity) getActivity()).showMessage(getString(R.string.errormsg_couldnotretrieve));
((SettingsActivity) getActivity()).hideDialog();
}
@@ -341,13 +341,13 @@ public class SettingsFragment extends PreferenceFragment {
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error getting user settings (Server returned error): " + errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error getting user settings (Server returned error): " + errorMsg);
((SettingsActivity) getActivity()).showMessage(getResources().getString(R.string.txt_errormsg_changesettings));
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
} finally {
updatePrefs();
}
@@ -359,7 +359,7 @@ public class SettingsFragment extends PreferenceFragment {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Error getting user settings: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error getting user settings: " + error.getMessage());
((SettingsActivity) getActivity()).showMessage(getString(R.string.errormsg_couldnotretrieve));
((SettingsActivity) getActivity()).hideDialog();
updatePrefs();

View File

@@ -11,7 +11,7 @@ import android.widget.TextView;
import com.beardedhen.androidbootstrap.BootstrapButton;
import com.beardedhen.androidbootstrap.api.defaults.DefaultBootstrapBrand;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.R;
import org.deke.risk.riskahead.SubscriptionsActivity;
@@ -95,8 +95,8 @@ public class SubscriptionItemFragment extends Fragment {
imgSubs.setVisibility(View.VISIBLE);
btnBadge.setVisibility(View.VISIBLE);
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
}

View File

@@ -14,7 +14,7 @@ import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.ProfileActivity;
import org.deke.risk.riskahead.R;
@@ -60,8 +60,8 @@ public class Top10Fragment extends Fragment {
try {
parent.gotoProfileActivity(resultList.get(position).getString("id"));
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
});
@@ -80,7 +80,7 @@ public class Top10Fragment extends Fragment {
String tag_string_req2 = "req_top10";
AppController.getInstance().addToRequestQueue(strReq2, tag_string_req2);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}
@@ -111,7 +111,7 @@ public class Top10Fragment extends Fragment {
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error getting top 10 stats (Server returned error): " + errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error getting top 10 stats (Server returned error): " + errorMsg);
parent.showMessage(getResources().getString(R.string.txt_errormsg_gettop10));
}
@@ -119,12 +119,12 @@ public class Top10Fragment extends Fragment {
if(activity != null){
activity.hideDialog();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
@@ -132,14 +132,14 @@ public class Top10Fragment extends Fragment {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Error getting top 10 stats: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error getting top 10 stats: " + error.getMessage());
ProfileActivity activity = (ProfileActivity) getActivity();
if(activity != null){
activity.hideDialog();
activity.handleVolleyErrorResponse();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get parent Activity");
Crashlytics.log(Log.ERROR, TAG, "Could not get parent Activity");
}
}
}) {

View File

@@ -15,10 +15,13 @@ import android.widget.Toast;
import io.fabric.sdk.android.Fabric;
import com.beardedhen.androidbootstrap.BootstrapButton;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import com.twitter.sdk.android.core.Callback;
import com.twitter.sdk.android.core.DefaultLogger;
import com.twitter.sdk.android.core.Result;
import com.twitter.sdk.android.core.Twitter;
import com.twitter.sdk.android.core.TwitterAuthToken;
import com.twitter.sdk.android.core.TwitterConfig;
import com.twitter.sdk.android.core.TwitterCore;
import com.twitter.sdk.android.core.TwitterAuthConfig;
import com.twitter.sdk.android.core.TwitterException;
@@ -65,16 +68,18 @@ public class TwitterButtonFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
mContext = getActivity().getApplicationContext();
TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET);
Fabric.with(mContext, new TwitterCore(authConfig));
TwitterConfig config = new TwitterConfig.Builder(mContext)
.logger(new DefaultLogger(Log.INFO))
.twitterAuthConfig(new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET))
.debug(true)
.build();
Twitter.initialize(config);
client = new TwitterAuthClient();
view = inflater.inflate(R.layout.fragment_twitter_button, container, false);
btnLoginTW = view.findViewById(R.id.btn_login_twitter);
btnLoginTW.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
btnLoginTW.setOnClickListener((View v) ->
client.authorize(getActivity(), new Callback<TwitterSession>() {
@Override
public void success(Result<TwitterSession> result) {
@@ -89,12 +94,11 @@ public class TwitterButtonFragment extends Fragment {
@Override
public void failure(TwitterException exception) {
FirebaseCrash.logcat(Log.ERROR, TAG, "onFailure wird ausgeführt: "+exception);
Crashlytics.log(Log.ERROR, TAG, "onFailure wird ausgeführt: "+exception);
showMessage("Could not log in with Twitter. Please use E-Mail instead or try again later.");
}
});
}
});
})
);
if(isAuthed()){
// log out

View File

@@ -9,6 +9,9 @@ import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;
import com.beardedhen.androidbootstrap.TypefaceProvider;
import com.crashlytics.android.Crashlytics;
import io.fabric.sdk.android.Fabric;
/**
*
@@ -29,8 +32,9 @@ public class AppController extends Application {
@Override
public void onCreate() {
super.onCreate();
mInstance = this;
Fabric.with(this, new Crashlytics());
mInstance = this;
TypefaceProvider.registerDefaultIconSets();
}

View File

@@ -43,7 +43,7 @@ import com.android.volley.toolbox.StringRequest;
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.InterstitialAd;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import com.mikepenz.google_material_typeface_library.GoogleMaterial;
import com.mikepenz.materialdrawer.AccountHeader;
import com.mikepenz.materialdrawer.AccountHeaderBuilder;
@@ -69,6 +69,8 @@ import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import io.fabric.sdk.android.Fabric;
/**
* (C) Copyright 2016 RiskAhead (http://www.riskahead.net)
* Developer & Contributor: Dennis Thießen (dennis.thiessen@riskahead.net)
@@ -118,6 +120,7 @@ public abstract class BaseActivity extends AppCompatActivity {
@Override
protected void onStart() {
super.onStart();
if (onStartCount > 1) {
this.overridePendingTransition(R.anim.slide_in_right,
R.anim.slide_out_right);
@@ -126,14 +129,12 @@ public abstract class BaseActivity extends AppCompatActivity {
onStartCount++;
onStartCount++;
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
onStartCount = 1;
if (savedInstanceState == null) {
this.overridePendingTransition(R.anim.slide_in_left,
@@ -150,13 +151,10 @@ public abstract class BaseActivity extends AppCompatActivity {
session = new SessionManager(getApplicationContext());
user = session.getUserDetails();
Log.d(TAG, user.get(SessionManager.KEY_UID));
mToolbar = findViewById(R.id.toolbar);
setSupportActionBar(mToolbar);
initNavigationDrawer(savedInstanceState);
if (!isMyNotificationServiceRunning()) {
Log.d(TAG, "onCreate: NotificationService not running. Starting service...");
@@ -171,7 +169,7 @@ public abstract class BaseActivity extends AppCompatActivity {
if (am != null){
am.setInexactRepeating(AlarmManager.RTC, firstStart, interval, wtdSServicePendingIntent);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "AlarmManager in BaseActivity is null. No AlarmManager found.");
Crashlytics.log(Log.ERROR, TAG, "AlarmManager in BaseActivity is null. No AlarmManager found.");
}
startService(new Intent(this, NotificationService.class));
@@ -193,8 +191,6 @@ public abstract class BaseActivity extends AppCompatActivity {
@Override
protected void onDestroy() {
super.onDestroy();
unregisterBroadcastReceiver();
}
@Override
@@ -214,8 +210,8 @@ public abstract class BaseActivity extends AppCompatActivity {
try {
unregisterReceiver(myReceiver);
} catch (final Exception e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Exception caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Exception caught");
Crashlytics.logException(e);
}
}
@@ -226,7 +222,7 @@ public abstract class BaseActivity extends AppCompatActivity {
if(pDialog.getWindow() != null){
pDialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "ProgressDialog Window is null. Could not set BackgroundDrawable.");
Crashlytics.log(Log.ERROR, TAG, "ProgressDialog Window is null. Could not set BackgroundDrawable.");
}
pDialog.setContentView(R.layout.dialog_progresscircle);
@@ -321,7 +317,6 @@ public abstract class BaseActivity extends AppCompatActivity {
@Override
public boolean onItemClick(View view, int position, IDrawerItem drawerItem) {
switch ((int) drawerItem.getIdentifier()) {
case 2:
gotoReportActivity();
@@ -342,7 +337,8 @@ public abstract class BaseActivity extends AppCompatActivity {
logoutUser();
break;
default:
Log.d("Unknown switch page: ", Integer.toString(position));
Log.e("Unknown switch page: ", Integer.toString(position));
Crashlytics.log(Log.ERROR, TAG, "AlarmManager in BaseActivity is null. No AlarmManager found.");
break;
}
@@ -388,7 +384,7 @@ public abstract class BaseActivity extends AppCompatActivity {
if(connectivityManager != null){
activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not retrieve connectivityManager. Network Status can not be checked.");
Crashlytics.log(Log.ERROR, TAG, "Could not retrieve connectivityManager. Network Status can not be checked.");
return;
}
@@ -530,6 +526,12 @@ public abstract class BaseActivity extends AppCompatActivity {
startActivity(intent);
}
@Override
protected void onPause(){
super.onPause();
unregisterBroadcastReceiver();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
@@ -637,8 +639,8 @@ public abstract class BaseActivity extends AppCompatActivity {
try {
((TextView) dialoglayout.findViewById(R.id.lbl_about_version)).setText(String.format("Version: %s", getPackageManager().getPackageInfo(getPackageName(), 0).versionName));
} catch (PackageManager.NameNotFoundException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Exception caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Exception caught");
Crashlytics.logException(e);
}
AlertDialog.Builder builder = new AlertDialog.Builder(BaseActivity.this)
@@ -723,11 +725,11 @@ public abstract class BaseActivity extends AppCompatActivity {
showMessage(getString(R.string.txt_feedback_response));
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error sending feedback (server returned error): " + errorMsg);
Crashlytics.log(Log.ERROR, TAG, "Error sending feedback (server returned error): " + errorMsg);
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Exception caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Exception caught");
Crashlytics.logException(e);
}
}
@@ -735,7 +737,7 @@ public abstract class BaseActivity extends AppCompatActivity {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Error sending feedback: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error sending feedback: " + error.getMessage());
}
}) {
@@ -776,7 +778,7 @@ public abstract class BaseActivity extends AppCompatActivity {
if (NotificationService.class.getName().equals(service.service.getClassName())) return true;
}
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not retrieve Activity_Service Manager.");
Crashlytics.log(Log.ERROR, TAG, "Could not retrieve Activity_Service Manager.");
}
return false;
@@ -800,5 +802,10 @@ public abstract class BaseActivity extends AppCompatActivity {
}
}
public void dropBreadCumb(String category, String action, String label, long value) {
String breadCrumb = String.format("%s|%s|%s|%s", category, action, label, value);
Crashlytics.log(breadCrumb);
}
}

View File

@@ -7,7 +7,7 @@ import android.util.Log;
import com.google.android.gms.maps.model.BitmapDescriptor;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import com.google.maps.android.clustering.ClusterItem;
import org.deke.risk.riskahead.R;
@@ -138,8 +138,8 @@ public class IncidentReport implements ClusterItem {
if(mIncident.has("fid_others")) this.fidOthersCategory = mIncident.getInt("fid_others");
if(mIncident.has("etc_others")) this.etcOthersCategory = mIncident.getString("etc_others");
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Exception caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Exception caught");
Crashlytics.logException(e);
}
}
@@ -163,8 +163,8 @@ public class IncidentReport implements ClusterItem {
tmpFromDate = simpleDateFormat.parse(this.fromDate);
}
} catch (ParseException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Exception caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Exception caught");
Crashlytics.logException(e);
}
switch (this.fidIncidentCategory) {

View File

@@ -22,7 +22,7 @@ import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.google.android.gms.maps.model.LatLng;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import org.deke.risk.riskahead.MapsActivity;
import org.deke.risk.riskahead.R;
@@ -220,15 +220,15 @@ public class NotificationService extends Service {
if (!error) {
JSONArray notification = jObj.getJSONArray("msg");
sentNotification(notification);
} else {
String errorMsg = jObj.getString("error_msg");
FirebaseCrash.logcat(Log.ERROR, TAG, "Error getting incident notification (server returned error): " + errorMsg);
int loglevel = (errorMsg.contains("No incidents found in given area and from time")) ? Log.INFO : Log.ERROR;
Crashlytics.log(loglevel, TAG, "Error getting incident notification (server returned error): " + errorMsg);
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
@@ -236,7 +236,7 @@ public class NotificationService extends Service {
@Override
public void onErrorResponse(VolleyError error) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Error getting incident notification: " + error.getMessage());
Crashlytics.log(Log.ERROR, TAG, "Error getting incident notification: " + error.getMessage());
}
}) {
@@ -278,8 +278,8 @@ public class NotificationService extends Service {
try {
resultIntent.putExtra(EXTRA_MESSAGE, notification.getJSONObject(notification.length()-1).getDouble("latitude")+":"+notification.getJSONObject(notification.length()-1).getDouble("longitude"));
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);

View File

@@ -5,7 +5,7 @@ import android.util.Log;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.model.MarkerOptions;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import com.google.maps.android.clustering.ClusterManager;
import com.google.maps.android.clustering.view.DefaultClusterRenderer;
@@ -44,8 +44,8 @@ public class OwnIconRendered extends DefaultClusterRenderer<IncidentReport> {
dateToCheck = simpleDateFormat.parse(item.getFromDate());
}
} catch (ParseException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "ParseException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "ParseException caught");
Crashlytics.logException(e);
}
if(dateToCheck != null && !dateToCheck.after(new Date(System.currentTimeMillis()-14*24*60*60*1000))){

View File

@@ -2,7 +2,7 @@ package org.deke.risk.riskahead.helper;
import android.util.Log;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import java.util.ArrayList;
import java.util.HashMap;
@@ -30,8 +30,8 @@ public class PlaceJSONParser {
/* Retrieves all the elements in the 'places' array */
jPlaces = jObject.getJSONArray("predictions");
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
/* Invoking getPlaces with the array of json object
* where each json object represent a place
@@ -52,8 +52,8 @@ public class PlaceJSONParser {
placesList.add(place);
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
}
@@ -80,8 +80,8 @@ public class PlaceJSONParser {
place.put("reference",reference);
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
return place;
}

View File

@@ -2,7 +2,7 @@ package org.deke.risk.riskahead.helper;
import android.util.Log;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
import java.util.ArrayList;
import java.util.HashMap;
@@ -36,8 +36,8 @@ public class PlaceJSONParserDetail {
lng = (Double)jObject.getJSONObject("result").getJSONObject("geometry").getJSONObject("location").get("lng");
formattedAddress = (String) jObject.getJSONObject("result").get("formatted_address");
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Exception caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Exception caught");
Crashlytics.logException(e);
}
hm.put("lat", Double.toString(lat));

View File

@@ -23,7 +23,7 @@ import android.database.MatrixCursor;
import android.net.Uri;
import android.util.Log;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
/**
*
@@ -120,8 +120,8 @@ public class PlaceProvider extends ContentProvider {
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
c = mCursor;
break;
@@ -149,8 +149,8 @@ public class PlaceProvider extends ContentProvider {
mCursor.addRow(new String[] { Integer.toString(i), hMap.get("description"), hMap.get("reference") });
}
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
c = mCursor;
break;
@@ -164,8 +164,8 @@ public class PlaceProvider extends ContentProvider {
try {
detailsList = detailsParser.parse(new JSONObject(jsonPlaceDetails));
} catch (JSONException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "JSONException caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "JSONException caught");
Crashlytics.logException(e);
}
if(detailsList != null){
@@ -174,7 +174,7 @@ public class PlaceProvider extends ContentProvider {
mCursor.addRow(new String[]{ hMapDetails.get("formatted_address") , hMapDetails.get("lat") , hMapDetails.get("lng") });
}
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "DetailsList is null");
Crashlytics.log(Log.ERROR, TAG, "DetailsList is null");
}
c = mCursor;
@@ -239,8 +239,8 @@ public class PlaceProvider extends ContentProvider {
br.close();
}catch(Exception e){
FirebaseCrash.logcat(Log.ERROR, TAG, "downloadURL Exception");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "downloadURL Exception");
Crashlytics.logException(e);
}finally{
if(iStream != null) iStream.close();
if(urlConnection != null) urlConnection.disconnect();
@@ -302,8 +302,8 @@ public class PlaceProvider extends ContentProvider {
// Fetching the data from web service in background
data = downloadUrl(url);
}catch(Exception e){
FirebaseCrash.logcat(Log.ERROR, TAG, "Exception caught in backgroundTask");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Exception caught in backgroundTask");
Crashlytics.logException(e);
}
return data;
}
@@ -314,8 +314,8 @@ public class PlaceProvider extends ContentProvider {
try {
data = downloadUrl(url);
} catch (IOException e) {
FirebaseCrash.logcat(Log.ERROR, TAG, "Exception caught");
FirebaseCrash.report(e);
Crashlytics.log(Log.ERROR, TAG, "Exception caught");
Crashlytics.logException(e);
}
return data;
}

View File

@@ -8,7 +8,7 @@ import android.content.Intent;
import android.text.format.DateUtils;
import android.util.Log;
import com.google.firebase.crash.FirebaseCrash;
import com.crashlytics.android.Crashlytics;
/**
*
@@ -36,7 +36,7 @@ public class RABroadcastReceiver extends BroadcastReceiver {
if(am != null){
am.setInexactRepeating(AlarmManager.RTC, firstStart,interval, wtdSServicePendingIntent);
}else{
FirebaseCrash.logcat(Log.ERROR, TAG, "Could not get AlarmManager");
Crashlytics.log(Log.ERROR, TAG, "Could not get AlarmManager");
}
Log.v(TAG, "AlarmManager gesetzt");

View File

@@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical" android:layout_width="match_parent"
android:background="@color/tw__transparent"
android:background="@color/tw__blue_default"
android:padding="20dp"
android:layout_height="match_parent">

View File

@@ -7,10 +7,11 @@ buildscript {
url 'https://maven.fabric.io/public' }
maven {
url 'https://maven.google.com/' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.1'
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:3.2.0'
classpath 'io.fabric.tools:gradle:1.25.4'
}
}

View File

@@ -1,6 +1,6 @@
#Mon Mar 19 20:32:10 CET 2018
#Sun Apr 08 15:54:58 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip