From 22c926113ff039b74e5ecdebb3fb8bd9ee97f043 Mon Sep 17 00:00:00 2001 From: Thibault Malbranche Date: Fri, 11 Oct 2019 18:07:14 +0200 Subject: [PATCH] Update RNSentryModule.java --- android/src/main/java/io/sentry/RNSentryModule.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/io/sentry/RNSentryModule.java b/android/src/main/java/io/sentry/RNSentryModule.java index 5a05c2dac4..e9b53f9f94 100644 --- a/android/src/main/java/io/sentry/RNSentryModule.java +++ b/android/src/main/java/io/sentry/RNSentryModule.java @@ -187,7 +187,17 @@ public void sendEvent(ReadableMap event, Promise promise) { } if (breadcrumb.hasKey("type")) { - breadcrumbBuilder.setType(breadcrumb.getString("type")); + String breadcrumbType = breadcrumb.getString("type"); + + if (Breadcrumb.Type.HTTP.getValue().equals(breadcrumbType)) { + breadcrumbBuilder.setType(Breadcrumb.Type.HTTP); + } else if (Breadcrumb.Type.NAVIGATION.getValue().equals(breadcrumbType)) { + breadcrumbBuilder.setType(Breadcrumb.Type.NAVIGATION); + } else if (Breadcrumb.Type.USER.getValue().equals(breadcrumbType)) { + breadcrumbBuilder.setType(Breadcrumb.Type.USER); + } else { + breadcrumbBuilder.setType(Breadcrumb.Type.DEFAULT); + } } try {