diff --git a/build.gradle b/build.gradle index 032917d..0fbb4db 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 group 'com.microsoft.appcenter' -version '1.0.5' +version '1.0.6' java { withSourcesJar() diff --git a/src/main/java/com/microsoft/appcenter/crashes/Crashes.java b/src/main/java/com/microsoft/appcenter/crashes/Crashes.java index d6c75b8..d6c1fe2 100644 --- a/src/main/java/com/microsoft/appcenter/crashes/Crashes.java +++ b/src/main/java/com/microsoft/appcenter/crashes/Crashes.java @@ -1312,10 +1312,10 @@ private ErrorLogReport(ManagedErrorLog log, ErrorReport report) { * @param thread Thread. * @param attachments Optional attachments. */ - public static void trackCrash(@NotNull Throwable throwable, @NotNull Thread thread, @Nullable Iterable attachments) { - getInstance().queueCrash(throwable, thread, attachments); + public static UUID trackCrash(@NotNull Throwable throwable, @NotNull Thread thread, @Nullable Iterable attachments) { + return getInstance().queueCrash(throwable, thread, attachments); } - private synchronized void queueCrash(@NotNull final Throwable throwable, Thread thread, Iterable attachments) { + private synchronized UUID queueCrash(@NotNull final Throwable throwable, Thread thread, Iterable attachments) { final UUID errorId = UUID.randomUUID(); post(() -> { ManagedErrorLog errorLog = ErrorLogHelper.createErrorLog(mContext, thread, @@ -1326,5 +1326,6 @@ private synchronized void queueCrash(@NotNull final Throwable throwable, Thread /* Then attachments if any. */ if (attachments != null) sendErrorAttachment(errorId, attachments); }); + return errorId; } }