Skip to content

Commit

Permalink
Merge pull request #190 from bugsnag/next
Browse files Browse the repository at this point in the history
Release 4.8.0
  • Loading branch information
fractalwrench authored Jan 27, 2020
2 parents 9fe2e2a + 839c672 commit f91ba36
Show file tree
Hide file tree
Showing 12 changed files with 913 additions and 276 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# Changelog

## 4.7.0 (2019-01-22)
## 4.8.0 (2020-01-27)

### Enhancements

This release adds ANR detection for Unity apps running in Android. To enable this option you should
set `Bugsnag.Configuration.AutoDetectAnrs` to `true` after initialising bugsnag in the normal way.

* Detect ANRs on Android and provide configuration option to enable detection
[#184](https://github.com/bugsnag/bugsnag-unity/pull/184)

### Bug fixes

* (Android) Prevent SIGABRT when altering Configuration on background thread
[#187](https://github.com/bugsnag/bugsnag-unity/pull/187)

## 4.7.0 (2020-01-22)

* Update bugsnag-android to v4.22.2:

Expand Down
2 changes: 1 addition & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var target = Argument("target", "Default");
var solution = File("./BugsnagUnity.sln");
var configuration = Argument("configuration", "Release");
var project = File("./src/BugsnagUnity/BugsnagUnity.csproj");
var version = "4.7.0";
var version = "4.8.0";

Task("Restore-NuGet-Packages")
.Does(() => NuGetRestore(solution));
Expand Down
27 changes: 25 additions & 2 deletions example/Assets/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ public Button
LogDebugException,
LogDebugError,
NativeCrash,
NativeBackgroundCrash;
NativeBackgroundCrash,
NDKCrash,
ANR;

void Start ()
{
Expand All @@ -56,6 +58,8 @@ void Start ()
LogDebugError.GetComponent<Button>().onClick.AddListener(OnLogDebugErrorClick);
NativeCrash.GetComponent<Button>().onClick.AddListener(OnNativeCrashClick);
NativeBackgroundCrash.GetComponent<Button>().onClick.AddListener(OnNativeBackgroundCrashClick);
NDKCrash.GetComponent<Button>().onClick.AddListener(OnNDKCrashClick);
ANR.GetComponent<Button>().onClick.AddListener(OnANRClick);
}

#if UNITY_IOS
Expand Down Expand Up @@ -88,7 +92,26 @@ private void OnNativeBackgroundCrashClick()
{
java.Call("BackgroundCrash");
}

#endif
}

private void OnNDKCrashClick()
{
#if UNITY_ANDROID
using (var java = new AndroidJavaObject("com.example.lib.BugsnagCrash"))
{
java.Call("NdkCrash");
}
#endif
}

private void OnANRClick()
{
#if UNITY_ANDROID
using (var java = new AndroidJavaObject("com.example.lib.BugsnagCrash"))
{
java.Call("AnrCrash");
}
#endif
}

Expand Down
Loading

0 comments on commit f91ba36

Please sign in to comment.