Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity: add methods for setting autoNotify and autoDetectAnrs #1233

Merged
merged 4 commits into from
May 4, 2021

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Apr 30, 2021

Goal

Adds non-public methods to support the autoNotify and autoDetectAnrs APIs on Unity, which allow automatic error detection to be switched off after Bugsnag has been initilized: https://docs.bugsnag.com/platforms/unity/configuration-options/#autodetectanrs

Changeset

  • Added NativeInterface.setAutoDetectAnrs and NativeInterface.setAutoNotify, which will be invoked from Unity
  • Refactored AnrPlugin and NdkPlugin to allow for signal handlers etc to be unregistered in a call to Plugin#unload()
  • Refactored ExceptionHandler to allow uninstalling
  • Altered Client and PluginClient to ensure that any change in autoNotify/autoDetectAnrs is propagated to all automatic error detection sources

Testing

Added unit tests throughout, and added E2E tests which verify that ANRs/JVM/NDK errors are recorded appropriately when automatic capture is enabled/disabled.

@fractalwrench fractalwrench changed the title Android auto notify Add autoNotify and autoDetectAnrs for use by Unity May 4, 2021
@fractalwrench fractalwrench changed the title Add autoNotify and autoDetectAnrs for use by Unity Unity: add methods for setting autoNotify and autoDetectAnrs May 4, 2021
@fractalwrench fractalwrench marked this pull request as ready for review May 4, 2021 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants