title: How to pass string url from Main Activity to next Activity and load url in webView
body: <p>I have two Activity, One is Mainactivity and another is Secondactivity. Secondactivity contains Webview that loads local HTML pages from assets folder. </p>
  
  <p>Mainactivity contains buttons labeled as Button A and Button B when pressed would start Secondactivity. I would like to pass the string as URL from Mainactivity to Secondactivity which loads the A.html and B.html when Button A and Button B is pressed.</p>
  
  <p>For now, I have following code in Mainactivity Class</p>
  
  <pre><code> Fragment firstFragment1 = new browser();
              Bundle args1 = new Bundle();
              args1.putString("url1", "file:///android_asset/diploma.html");
              firstFragment1.setArguments(args1);
              moveToFragment(firstFragment1);
              break;
  </code></pre>
  
  <p>and on SecondActivity Class, I have following code</p>
  
  <pre><code>    String url1 = getArguments().getString("url1");
  
  
      myWebView=(WebView)rootView.findViewById(R.id.webview);
      myWebView.getSettings().setBuiltInZoomControls(true);
  
      myWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
      myWebView.getSettings().setLoadsImagesAutomatically(true);
      myWebView.getSettings().setJavaScriptEnabled(true);
  
      myWebView.getSettings().setBuiltInZoomControls(true);
  
      myWebView.setInitialScale(1);
      myWebView.getSettings().setLoadWithOverviewMode(true);
      myWebView.getSettings().setUseWideViewPort(true);
  
      WebSettings webSettings = myWebView.getSettings();
  
  
      myWebView.loadUrl(url1);
  
  
      return rootView;
  
  
  }
  </code></pre>
  
  <p>Which work for Fragment flawlessly, but how do I make it work for Activity to activity??</p>