title: Pass Values to Webview From Intent
body: <p>How can i set the passed username, userphone , useremail and userpass from an android activity to  the php form.
  WebActivity.java</p>
  <pre><code>public class WebViewActivity extends AppCompatActivity {
      private WebView webView;
  
      public static final String USER_PHONE = &quot;userphoneKey&quot;;
      public static final String USER_NAME = &quot;usernameKey&quot;;
      public static final String USER_EMAIL = &quot;useremailKey&quot;;
      public static final String USER_PASS = &quot;userpassKey&quot;;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.webview_activity);
  
          Intent i = getIntent ( );
          final String uName = i.getStringExtra(USER_NAME);
          final String uPhone = i.getStringExtra(USER_PHONE);
          final String uEmail = i.getStringExtra(USER_EMAIL);
          final String uPass = i.getStringExtra(USER_PASS);
  
          webView = (WebView) findViewById(R.id.webview);
          webView.setWebViewClient(new WebViewClient ());
          webView.loadUrl(&quot;https://www.muthuti.com/forms/login.php&quot;);
          WebSettings webSettings = webView.getSettings();
          webSettings.setJavaScriptEnabled(true);
      }
  
      @Override
      public void onBackPressed() {
          if (webView.canGoBack()) {
              webView.goBack();
          } else {
              super.onBackPressed();
          }
      }
  }
  </code></pre>
  <p>The form i want the username, userphone , useremail and userpass automatically set.
  login.php Form</p>
  <pre><code>&lt;div class=&quot;container&quot;&gt;
  &lt;form action=&quot;logemin.php&quot; method=&quot;post&quot;&gt;
      &lt;label for=&quot;uname&quot;&gt;&lt;b&gt;Username&lt;/b&gt;&lt;/label&gt;
      &lt;input type=&quot;text&quot; placeholder=&quot;Enter Username&quot; name=&quot;uname&quot; required&gt;
      &lt;label for=&quot;uphone&quot;&gt;&lt;b&gt;Userphone&lt;/b&gt;&lt;/label&gt;
      &lt;input type=&quot;text&quot; placeholder=&quot;Enter Userphone&quot; name=&quot;uphone&quot; required&gt;
      &lt;label for=&quot;uemail&quot;&gt;&lt;b&gt;Useremail&lt;/b&gt;&lt;/label&gt;
      &lt;input type=&quot;text&quot; placeholder=&quot;Enter Useremail&quot; name=&quot;uemail&quot; required&gt;
      &lt;label for=&quot;psw&quot;&gt;&lt;b&gt;Password&lt;/b&gt;&lt;/label&gt;
      &lt;input type=&quot;password&quot; placeholder=&quot;Enter Password&quot; name=&quot;psw&quot; required&gt;
      &lt;button type=&quot;submit&quot;&gt;Login&lt;/button&gt;
      &lt;label&gt;&lt;input type=&quot;checkbox&quot; checked=&quot;checked&quot; name=&quot;remember&quot;&gt; Remember me&lt;/label&gt;
    &lt;/div&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>