使用webview打开加密url

Open and encrypted url using webview

如何在 Android 中使用 webview 打开此 URL?

http://newinvest.erokda.in/downloadglobalfile.php?filename=811536217871_mandate-MTIwNzkw-NzE3OQ==-.pdf&path=1&userId=MTIwNzkw&action=globalfiledownload&aData=OTYxOTc5NzA4OXx5dGVzdGlkMDFAZ21haWwuY29t

与其他 URL 一样,但使用 UTF-8 编码以保留特殊字符。

URLEncoder.encode(URL, "utf-8");

XML 布局中的 WebView 元素。

<WebView  xmlns:android="http://schemas.android.com/apk/res/android"
   android:id="@+id/webview"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
/>

然后只需执行以下操作。

// ......
final String url = "<your link text>"
// ......
final WebView browser = (WebView) findViewById(R.id.webview);
browser.loadUrl(url );
// ......