-
Notifications
You must be signed in to change notification settings - Fork 50
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
Ensure all task exceptions are handled, to prevent crashes. #138
Conversation
Out of curiosity @Erfa, what one scenario led to the crash when calling |
I was running it on an emulator which I had apparently loaded with an image that didn't have Play Store support. Reproducible every time for me. |
@Abedalkareem I will have the permission request sorted within a couple of days. |
This also closes #149. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove your changes to Leaderboards.kt
from this PR as a more extensive fix had to be merged to account for a permission request.
Something like that? |
Perfect. Thanks @Erfa. |
task.result.get()
crashes for me when callingloadAchievement
in one scenario. I don't think this is intentional? Seems like this should be handled by the failure listener which was already present. After this change it is.I also changed a similar case with leaderboards and saves. After this no completeListeners should assume that data exists.
Disclaimer: I don't really know Kotlin and haven't worked with native Android in years, but it seems pretty straightforward.