反正有从链接中提取文件吗?

时间:2018-07-28 06:48:57

标签: android

我一直在编写一个下载器,它可以很好地处理带有扩展名的链接。例如

http://speedtest.ftp.otenet.gr/files/test100Mb.db

但不适用于此链接:

https://dl.apkmos.com/?dl=423b122b186bac91faf269d8432d393c

如何从上述URL中提取可下载的链接?

1 个答案:

答案 0 :(得分:0)

尝试一下

private class MyBrowser extends WebViewClient {
    @Override
    public boolean shouldOverrideUrlLoading(final WebView view, String url) {
        view.loadUrl(url);
        view.addJavascriptInterface(new Object()
        {
            @JavascriptInterface
            public void performClick() throws Exception
            {
                view.getUrl();  // here you can get apk download urls
                Log.d("LOGIN::", "Clicked");
              //  Toast.makeText(MainActivity.this, "Login clicked", Toast.LENGTH_LONG).show();
            }
        }, "login");
        return true;
    }
}

Webview's Html button click detection in Activity(java code)