How to POST data from a Android Java button then load it in a web browser? [duplicate]
Possible Duplicate:
How can I open android browser with specified POST parameters?
I have set up a Button that will link to Google Checkout, however, I need to POST a whole lot of required data (not GET) so I can't use the usual Intent method.
//open the browser
Uri u = Uri.parse(uri.toString());
Intent i = new Intent(Intent.ACTION_VIEW, u);
startActivity(i);
How do I post data to a URL by pressing a button and then load the result into a web browser? In this case it will be the Google Checkout webpage.
Please see the following link for some details Android Webview POST. You will have to use a webview in your layout, you could submit the details then load the results into the webview.
Another which maybe of some use - although not to do with a webview: Android JSON HttpClient to send data to PHP server with HttpResponse
精彩评论