-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: android mark sessions as crashed (#347)
- Loading branch information
1 parent
514cc24
commit 719392c
Showing
10 changed files
with
70 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.vs/ | ||
.vsconfig | ||
*.user | ||
.idea/ | ||
obj/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# 'Sentry' is the tag from the Android SDK. 'Unity' includes the C# layer in the Unity SDK: | ||
adb logcat Unity:V Sentry:V '*:S' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using UnityEngine; | ||
|
||
namespace Sentry.Unity.Android | ||
{ | ||
/// <summary> | ||
/// P/Invoke to `sentry-java` methods. | ||
/// </summary> | ||
/// <remarks> | ||
/// The `sentry-java` SDK on Android is brought in through the `sentry-android-core` | ||
/// and `sentry-java` maven packages. | ||
/// </remarks> | ||
/// <see href="https://github.com/getsentry/sentry-java"/> | ||
public static class SentryJava | ||
{ | ||
/// <summary> | ||
/// Returns whether or not the last run resulted in a crash. | ||
/// </summary> | ||
/// <remarks> | ||
/// This value is returned by the Android SDK and reports for both ART and NDK. | ||
/// </remarks> | ||
/// <returns> | ||
/// True if the last run terminated in a crash. No otherwise. | ||
/// If the SDK wasn't able to find this information, null is returned. | ||
/// </returns> | ||
public static bool? CrashedLastRun() | ||
{ | ||
using var jo = new AndroidJavaObject("io.sentry.Sentry"); | ||
return jo.CallStatic<AndroidJavaObject>("isCrashedLastRun") | ||
?.Call<bool>("booleanValue"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule sentry-dotnet
updated
8 files
Submodule sentry-java
updated
11 files