Fixed crashlytics

This commit is contained in:
Dennis Thiessen
2018-07-16 21:55:01 +02:00
parent 234b9939a7
commit 8317e7253c
6 changed files with 14 additions and 12 deletions

View File

@@ -7,10 +7,10 @@ android {
defaultConfig { defaultConfig {
applicationId "org.deke.risk.riskahead" applicationId "org.deke.risk.riskahead"
minSdkVersion 15 minSdkVersion 19
targetSdkVersion 26 targetSdkVersion 26
versionCode 46 versionCode 48
versionName "3.1.2" versionName "3.1.4"
} }
buildTypes { buildTypes {
release { release {

View File

@@ -25,8 +25,13 @@
-keep class com.android.volley.** { *; } -keep class com.android.volley.** { *; }
-dontwarn 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 class android.support.v7.** { *; }
-keep interface 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":46,"versionName":"3.1.2","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] [{"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 <meta-data
android:name="com.google.android.maps.v2.API_KEY" android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyALm-1lEf5xualfyHdmNEdAsXlbwOQhbI8" /> android:value="AIzaSyALm-1lEf5xualfyHdmNEdAsXlbwOQhbI8" />
<meta-data
android:name="io.fabric.ApiKey"
android:value="c44233e93b0a9702b00bd632380572d758096e3c" />
<meta-data <meta-data
android:name="com.facebook.sdk.ApplicationId" android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" /> android:value="@string/facebook_app_id" />

View File

@@ -220,11 +220,11 @@ public class NotificationService extends Service {
if (!error) { if (!error) {
JSONArray notification = jObj.getJSONArray("msg"); JSONArray notification = jObj.getJSONArray("msg");
sentNotification(notification); sentNotification(notification);
} else { } else {
String errorMsg = jObj.getString("error_msg"); String errorMsg = jObj.getString("error_msg");
Crashlytics.log(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) { } catch (JSONException e) {
Crashlytics.log(Log.ERROR, TAG, "JSONException caught"); Crashlytics.log(Log.ERROR, TAG, "JSONException caught");