Retain breadcrumbs even if Android kill app process
I have a following scenario:
- User uses my app
- User clicks home button so the app goes foreground
- Android kills app's process in order to free memory
- User opens the app again, Android restores its state
- Crash happens
In this scenario I have full stack trace and error info on Sentry, however I do not know what happened before app was killed and reopened because I have only breadcrumbs from the beginning of current app process.
Is it possible to force breadcrumbs to be retained during the process death?
Good idea, I honestly never considered it. We should probably attempt to store all context information on Android.
should be pretty straightforward to implement, once ANRv2 lands
Any update on this?
Ideally we can just restore the breadcrumbs on app-start
Closing as dup of https://github.com/getsentry/sentry-java/issues/3956 and https://github.com/getsentry/sentry-java/issues/2056