In my activity I have some links that when user click on it, WebView will open and load a page from Internet.
My Question is, do I have to set permission in manifest file for accessing Internet?
Because when I run the program, emulator says web page is not available.
My code is:
final TextView tv01 = (TextView) findViewById(R.id.pck_01);
final WebView wv = new WebView(this);
tv01.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
wv.loadUrl("http://www.stackoverflow.com");
setContentView(wv);
}
});
Yes you will need to have the following permission added to the manifest to access and URL outside of the device:
Seems to be confirmed here as well:
Does Android WebView need permissions for opening external URLs?