mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 10:19:33 +02:00
better book network integration
This commit is contained in:
parent
7ee92ff51f
commit
423cd5eed4
35 changed files with 126 additions and 17 deletions
|
@ -99,6 +99,14 @@ public abstract class Util implements UserRegistrationConstants {
|
|||
activity.startActivity(intent);
|
||||
}
|
||||
|
||||
public static boolean isOurLink(String url) {
|
||||
try {
|
||||
return Uri.parse(url).getHost().endsWith(".fbreader.org");
|
||||
} catch (Throwable t) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static void openInBrowser(Activity activity, String url) {
|
||||
if (url != null) {
|
||||
url = NetworkLibrary.Instance().rewriteUrl(url, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue