Skip to content
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

Feature default app dialog #242

Merged
merged 6 commits into from Feb 8, 2019
Merged

Conversation

a-szotyori
Copy link
Member

When GVL is launched with an external file (aka "open with") we now check whether the app is set as default for that file type. If the app is the default, then we show an alert informing the user about this and telling them how to revert this. The user can either continue or be directed to the app's screen in the Android Settings app.

For images the dialog is shown in the review screens and for pdfs in the analysis screen.

Note: Showing an alert was only possible in the camera screen before. I had to touch a lot of files to allow the other screen to show dialogs, too, with minimal code duplication.

How to test

Open a pdf or an image with one of the example apps and use the ALWAYS option. The dialog should be shown.

@a-szotyori a-szotyori self-assigned this Feb 8, 2019
Copy link
Contributor

@kikettas kikettas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing to complain about, it looks good to me. Liked that you went with some Helpers to avoid the duplicated code 👍

showError(mDocumentAnalysisErrorMessage,
mFragment.getActivity().getString(R.string.gv_document_analysis_error_retry),
new View.OnClickListener() {
if (MimeType.APPLICATION_PDF.asString().equals(mMultiPageDocument.getMimeType())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This 🔺 cannot be avoided, can it?

@a-szotyori a-szotyori merged commit bc53330 into develop Feb 8, 2019
@a-szotyori a-szotyori deleted the feature-default-app-dialog branch February 8, 2019 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants