Skip to content
New issue

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

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

Already on GitHub? # to your account

Running code before app is killed #633

Closed
ZimM-LostPolygon opened this issue Feb 4, 2018 · 3 comments
Closed

Running code before app is killed #633

ZimM-LostPolygon opened this issue Feb 4, 2018 · 3 comments

Comments

@ZimM-LostPolygon
Copy link

I want to restart my app after a crash. However, I can't find any good way to execute some piece of code before app is killed. I thought about using ReportingAdministrator or ReportInteractionExecutor, but I am using AcraLimiter, so it's not going to work. If LimitingReportAdministrator detects that report must not be collected or sent, my ReportingAdministrator will never run.

Is there any workaround?

@ZimM-LostPolygon
Copy link
Author

Proposal: ReportingAdministrator.notifyReportDropped should be called on all enabled ReportingAdministrator's, not just the blocking one.

@F43nd1r
Copy link
Member

F43nd1r commented Feb 7, 2018

You can use shouldKillApplication in 5.1.0. Also, any ReportingAdministrator method is guaranteed to be called on all ReportingAdministrators.

@ZimM-LostPolygon
Copy link
Author

That's exactly what I needed, and it works great. Thank you!

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants