How to set action to POST on opening a browser using intent
Here's my current code:
Intent browserIntent;
browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url);
startActivity(browserIntent);
How to set action to POST on opening a browser using intent
Here's my current code:
Intent browserIntent;
browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url);
startActivity(browserIntent);
I am afraid , it's not possible with the browser. However you can achive it using Webview
and its postUrl()
method.
String url = "http://www.google.com";
String post_Data = "username=uname&password=pwd";
webview.postUrl(url,EncodingUtils.getBytes(postData, "BASE64"));