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

[UX] Add Device:openLink() stub for Linux SDL #4822

Merged
merged 2 commits into from Mar 20, 2019

Conversation

Projects
None yet
3 participants
@Frenzie
Copy link
Member

commented Mar 20, 2019

References #4821.

@Frenzie Frenzie added this to the 2019.04 milestone Mar 20, 2019

@Frenzie Frenzie requested a review from poire-z Mar 20, 2019

@poire-z

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2019

It's minimal for now and non intrusive to other platforms, so probably fine.

But I guess one could still like to see the url in a confirmBox and confirm he really wants to launch a fat web browser to go there.
And more generically, there should probably be a bunch of new submenus in Links>:
Wikipedia links > Ignore | Lookup in KOReader | Open external browser | Wallabag | WhateverOtherPluginThatCouldDoSomethingWithLinks - and why not a checkbox [ ] ask for confirmation.
And the same for External links>.

On Android, I guess it should launch an intent that would be catch by any app able to handle http:// links.

@pazos

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2019

On Android, I guess it should launch an intent that would be catch by any app able to handle http:// links.

It becomes harder on new android versions, but yeah. We need to take a string with url and create a new Uri with http scheme and then start the new activity via intent (we should catch the ActivityNotFound error that triggers if no activity is registered to view that kind of scheme and, optionally, notify the user that no external browser is available via android.notification).

@Frenzie

This comment has been minimized.

Copy link
Member Author

commented Mar 20, 2019

@poire-z

It's minimal for now and non intrusive to other platforms, so probably fine.

I don't really know what intrusive could even mean here? :-)

But I guess one could still like to see the url in a confirmBox and confirm he really wants to launch a fat web browser to go there.

I'd say that's a matter for the URL handler, not for KOReader. If the URL handler launches a "fat web browser" that's the user's choice outside of KOReader. (Same for Android.) But sure, some kind of additional setting could be added in the future.

@pazos
I'll try to refrain from commenting on Android, other than stating that it's typical of the system that there should be anything even remotely complicated about opening a simple link post-Windows 95 or so.

@Frenzie Frenzie merged commit b1ed283 into koreader:master Mar 20, 2019

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@Frenzie Frenzie deleted the Frenzie:open-link branch Mar 20, 2019

Frenzie added a commit to Frenzie/koreader that referenced this pull request Mar 20, 2019

Frenzie added a commit that referenced this pull request Mar 20, 2019

[Android, UX] Add Device:openLink() implementation (#4824)
Fixes #4821

Same as #4822

Thanks to @pazos who implemented the Android backend, see koreader/android-luajit-launcher#133
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.