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

@@ -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

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