-
Notifications
You must be signed in to change notification settings - Fork 30
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
fix: handling ActivityNotFoundExceptions [WPB-9794] #3163
Conversation
Ups 🫰🟨This PR is too big. Please try to break it up into smaller PRs. |
…andle-activitynotfoundexceptions
…andle-activitynotfoundexceptions
…andle-activitynotfoundexceptions
Built wire-android-staging-compat-pr-3163.apk is available for download |
Built wire-android-dev-debug-pr-3163.apk is available for download |
…andle-activitynotfoundexceptions # Conflicts: # app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/AdditionalOptions.kt # app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/AttachmentOptions.kt # app/src/main/kotlin/com/wire/android/ui/home/settings/backup/dialog/restore/RestoreBackupDialogs.kt
|
Built wire-android-staging-compat-pr-3163.apk is available for download |
Built wire-android-dev-debug-pr-3163.apk is available for download |
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.
🧑🏭 🏅
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
There are
ActivityNotFoundException
s when executing actions that need to be handled by another apps, like taking a photo, capturing a video, choosing or saving file.Solutions
Handle these issues in a unified way by showing a snackbar with proper info (like "No camera app found to complete this action.").
It looks bigger than it actually is because multiple things were moved around as I took the possibility and simplified the code responsible for permissions and intents on this occasion, because all requests look basically the same, the difference is only type of permission or
ActivityResultContract
so it can be unified without any duplicated code. Also, there were already multiple classes inside that package so they got grouped into basically two categories and combined in dedicated files: "permission requests" (only to get given permissions) and "intent permission requests" (to make action and ask for permission if needed).Testing
How to Test
Make any action that requires permission or is executed outside the app (take a picture, record a video, make a backup, choose image from gallery or asset from file manager).
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.