Skip to content Skip to sidebar Skip to footer

How To Send Data From Activity To A Webview In That Activity Itself?

From this Activity I am sending data to another activity public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCr

Solution 1:

Did you checked Android WebView documentation?

 // Simplest usage: note that an exception will NOT be thrown
 // if there is an error loading this page (see below).
 webview.loadUrl("http://slashdot.org/");

 // OR, you can also load from an HTML string:
 String summary = "<html><body>You scored <b>192</b> points.</body></html>";
 webview.loadData(summary, "text/html", null);
 // ... although note that there are restrictions on what this HTML can do.
 // See the JavaDocs for loadData() and loadDataWithBaseURL() for more info.

Solution 2:


Post a Comment for "How To Send Data From Activity To A Webview In That Activity Itself?"