feat: handle android.intent.action.WEB_SEARCH
and open wikipedia links
#3864
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #731
This PR adds 2 things:
https://en.wikipedia.org/wiki/Special:Search?search=query
q
query parameter and the wikipediasearch
query parameterandroid.intent.action.WEB_SEARCH
which is the default web search intent. If an app triggers a web search then Kiwix can be used to handle the search. It is disabled by default and can be enabled in the settingsI also added a setting to automatically open supported external links within the app.
How does the project handles localization? i only added english localization.
When you make a search with openSearch, is it searched in all books?
I have a remaining question. If i have an url pointing to an existing page within a book like
https://fr.wikipedia.org/wiki/Gi%C3%A8res
is it possible to open it directly within a book? Right now it is always seen as a search so i kind of end up in a endless search loopEDIT: i found a "basic" way of finding the correct book/zim for an url (
https://fr.wikipedia.org/wiki/Gi%C3%A8res
) but when i try to open that page within that book i get an webview errorthe page cannot be loaded
. Are the URLs transformed in the zim? @kelson42 maybe you know?Screenshots