Open TimMagee opened 6 years ago
I did do some preliminary research into this and as far as I am aware to open domain links like that requires control over domain you are accessing.
Hmmm . . . . All the unofficial Reddit apps can open Reddit links. NewPipe can open Youtube links. Twidiere can open Twitter links. I don't think we need to control wikipedia.org to register as an opener for wikipedia.org links. Remember, we are simply registering our app withing the android system.
@TimMagee @mhutti1 , Actually, it just requires an intent filter.
You just need to add the following code in the android manifest:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="www.wikipedia.com" android:scheme="http" />
</intent-filter>
Oh ok. I equated offline search with linking for some reason. Is there a way to programmically add hosts though?
@mhutti1 I am not quite sure I understand. By "programmically adding hosts", do you mean that we add a set of hosts in a resource file and run a loop in the android manifest, and reference a host from the file in each iteration to make the intent filter?
Yes something like that.
I did some research on this topic, but i couldn't find much. I don't think we can add the loop directly in the xml file. However, we can write a simple python script that takes a resource file containing the hosts and generate the required xml code.
Ok, we can at least add a few different popular ones even if we can't do it programmically.
This tickets depends in addition of the implementation of https://github.com/openzim/mwoffliner/issues/278
It might be possible to implement this without that fix with a small workaround to edit the URL before passing it.
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
This issue is still as relevant today as it ever has been.
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
Here one problem is as well that, how to know that Kiwix has actually the ZIM able to provide the specific Wikipedia article provided?
Any updates on this?
This tickets depends in addition of the implementation of openzim/mwoffliner#278
Looks like it was implemented 👀 https://github.com/openzim/mwoffliner/pull/552
Could Kiwix Android open wikipedia.org links?
Or would this be too difficult?