android - How to open an external browser using Intent.ACTION_VIEW and passing parameters to post? -
i having trouble opening browser sending data via post. using html form follows:
<form method='post' action='https://cieloecommerce.cielo.com.br/transactional/order/buynow' target='blank'> <input type='hidden' name='id' value=xyz-xyz-xyz-xyz-xyz' /> <input type='image' name='submit' alt='comprar' src='{button image}'> </form>
however, when make call intent in android browser opens page error. this:
private string idcielo; [...] @override public void onclick(view view) { intent browserintent = new intent(intent.action_view, uri.parse("https://cieloecommerce.cielo.com.br/transactional/order/buynow"+idcielo)); getactivity().startactivity(browserintent); }
or
@override public void onclick(view view) { intent browserintent = new intent(intent.action_view, uri.parse("https://cieloecommerce.cielo.com.br/transactional/order/buynow”)); browserintent.putextra("id",idcielo); getactivity().startactivity(browserintent); }
please can me. must pass value post , open page in browser externally. thank you!
just call action.view intent , set datasource it
intent = new intent(intent.action_view); i.setdata(uri.parse("http://www.stackoverflow.com")); startactivity(i);
Comments
Post a Comment