Which option is the best when Passing String to another activity and load it inside a Webview.
I have two Activities so far:
1) MainActivity
2) WebViewpop
The MainActivity has an Edittext with a code of
String Message1 = txtEditor.getText().toString();
intent.putExtra("Url",Message1);
startActivity(intent);
and on my WebViewPop.class
webView = (WebView)findViewById(R.id.webView);
Bundle extras = getIntent().getExtras();
if (extras != null) {
String Message1 = extras.getString("Url");
webView.loadUrl(Message1);
webView.getSettings().setJavaScriptEnabled(true);
}
my Problem with this code is that it seems it doesnt seem to load the string that has been passed from the Mainactivity.
I also tried other Paths like saving to Internal/External Storage then Load it. It Does work(External Storage one) inside the Emulator but when I try it using my Phone, it doesn't find the saved file. Any help would be appreciated. TIA