I am having trouble opening the browser by sending data via post. Using the HTML form would be as 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 I make a call Intent in the Android browser opens a page with error. I like 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 help me. I must pass the value to post and open the page in a browser externally. Thank you!