1

How do I can open this URL using webview in Android?

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

shashank chandak
  • 544
  • 5
  • 13
naina
  • 13
  • 2

2 Answers2

0

Just like any other URL, but encode with UTF-8 to retain special characters.

URLEncoder.encode(URL, "utf-8");
Gokul Nath KP
  • 15,485
  • 24
  • 88
  • 126
0

XML WebView element in layout.

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

And then just do the following.

// ......
final String url = "<your link text>"
// ......
final WebView browser = (WebView) findViewById(R.id.webview);
browser.loadUrl(url );
// ......
GensaGames
  • 5,538
  • 4
  • 24
  • 53