Closed ananduri closed 7 years ago
Thanks for reporting it! It will be fixed soon.
Done. Expect the fix in the next release which would happen until the end of this week.
It is not reproducible on all devices. Some devices are not happy when their surface view is detached from the window. We have no way of knowing that, so we are ignoring such exception. There is no harm in doing so since preview will be restarted after Activity will be resumed.
Problem: When I hit the home, back, or recents buttons right after taking a picture, the app crashes.
Details: I have my code setup as follows:
This function is called when I click a button. If I pause the app right after hitting that button, I get a crash like this:
However, if I don't call
.whenAvailable()
onphotoResult.toPendingResult()
, no crash occurs.Maybe you guys have seen such a problem before? Is there an easy way to prevent this that I'm overlooking?