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

Fixed: PlayStore showing deep linking issue for URLs schema. #3824

Merged
merged 1 commit into from May 10, 2024
Merged

Conversation

MohitMaliFtechiz
Copy link
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz commented May 7, 2024

Fixes #3808

  • Removed the URL type deep link since we are mainly using deep links for opening zim files in the application, and URLs type deep links are for downloading the content not for opening the ZIM files so we are removing these deep links from our application.
  • Now user can normally download the zim files from (outside Kiwix) like other zim files.

@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as draft May 7, 2024 14:03
Copy link

codecov bot commented May 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.26%. Comparing base (4a1ac3a) to head (ffcfa9f).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3824      +/-   ##
============================================
- Coverage     53.34%   53.26%   -0.09%     
+ Complexity     1319     1315       -4     
============================================
  Files           292      292              
  Lines         11067    11067              
  Branches       1471     1471              
============================================
- Hits           5904     5895       -9     
- Misses         4191     4195       +4     
- Partials        972      977       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MohitMaliFtechiz
Copy link
Collaborator Author

@kelson42 The deep linking issue is resolved now since the file is uploaded to the server.

Screenshot from 2024-05-08 15-28-37

However, the action for this type of deep link is not properly defined in the application. Currently, if we click on this type of link on our phone then it takes us to the search screen. But IMO it is not the right behavior for URLs type links. See the video.

DeepLinkUrl.mp4

IMO, it should take user to the download screen since it is a URL. What do you think?

@kelson42
Copy link
Collaborator

kelson42 commented May 8, 2024

I hardly understand why it does not open the welcome page of the zim - the user just clixked on - indeed!! Pretty sure all of this was working fine. Please create complete test set for this.

@MohitMaliFtechiz
Copy link
Collaborator Author

I hardly understand why it does not open the welcome page of the zim - the user just clixked on - indeed!! Pretty sure all of this was working fine. Please create complete test set for this.

@kelson42 I think here is some confusion, The user clicks on the URL not on the ZIM file.

Pretty sure all of this was working fine.

Yes, we are handling the scenario where the user clicks on the zim file in his storage. The Zim file will open in the reader if a user clicks on the zim file.

I hardly understand why it does not open the welcome page of the zim -

Here, it is a link to the Zim file, not the path or URI of the zim file so that we can open the zim file in the reader. The deep link of URL types was probably introduced for opening the download screen but the handling is missing for this schema type.

However, if you want this scenario if a user clicks on the link then open the corresponding zim file reader and open the welcome page of zim file. so for this, we can make modifications to our code.

But it has some edge cases:

  • Since this is a URL, not the URI or path so we can't directly open the zim file in the reader, and we are saving the zimFilePath in our db with the fileName that we had put when the user refreshed the zim file data on LocalLibraryScreen. But if the user has not refreshed the data and tries to open the zim file by URL then it will fail to load the zim file.
  • If the user tries to open a link e.g. https://download.kiwix.org/zim/wikipedia.zim and the related zim file does not exist in the db then also it will fail to load the zim file.
  • Also If the user renames the file then it will not open via url.

@kelson42
Copy link
Collaborator

kelson42 commented May 8, 2024

@MohitMaliFtechiz If someone clicks on an http link leading to a ZIM (outside Kiwix) then nothing special should happen. The file should just be downloaded like any other.

…or opening zim files in the application, and URLs type deep links are for downloading the content not for opening the ZIM files so we are removing these deep links from our application.
@kelson42
Copy link
Collaborator

kelson42 commented May 9, 2024

What should we do with this Pr?

@MohitMaliFtechiz
Copy link
Collaborator Author

@kelson42 I have removed the URL type deep link from the application, and updated the PR description also, to fix the deep link issue reported by the plasytore we need to merge this PR.

@kelson42 kelson42 merged commit ab694c4 into main May 10, 2024
10 checks passed
@kelson42 kelson42 deleted the Fix#3808 branch May 10, 2024 05:34
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.

PlayStore showing deep linking issue for URLs schema.
3 participants