-
Notifications
You must be signed in to change notification settings - Fork 205
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
Add Bugsnag.isStarted #1621
Add Bugsnag.isStarted #1621
Conversation
hey @slack-jallen - thanks for the PR! Would you be able to share a little more info on your use case here please? Why do you need the Are you trying to store things (e.g. breadcrumbs, metadata) potentially before Bugsnag has started? |
It's not so much that it is delayed, it is that it might not be started at all depending on the configuration. It would be nice to know if Bugsnag API's are going to throw "IllegalStateException" before calling them. |
Hi @slack-jallen - thanks for the info. We'd usually recommend starting Bugsnag in all cases and using the Feel free to write in to [email protected] if you'd prefer to answer this away from a public forum! |
Thanks for the info. The app is using |
There are three cases that come to mind:
I don't think that enabling bugsnag everywhere is a reasonable solution, especially the latter two in a data-privacy sensitive environment |
Thanks for the additional info @slack-jallen, @ZacSweers! We're happy to add this feature, so we'll take the PR from here and get it merged 👍 |
Thanks @slack-jallen – I've included your changes on #1640 and we'll include in the next release. |
Thanks again for the contribution @slack-jallen, this has been released in https://github.com/bugsnag/bugsnag-android/releases/tag/v5.22.0 |
Awesome, thanks for taking it forward! |
Goal
Add Bugsnag.isStarted so that it is possible to check whether it is safe to call the other methods. Currently to use Bugsnag safely you either have to keep track of this yourself or wrap calls in try/catch.
Design
Add a static method
Changeset
Bugsnag.java
Testing
Added unit tests