I want to press an Android button and automatically direct the user to the PayPal site with all the relevant data POSTED along also. Is this possible?
A:
If PayPal offers a URL where you can supply the data you want via a GET request (i.e., encoded form variables as part of the URL itself), then yes -- just convert the URL into a Uri
via Uri.parse()
, then call startActivity()
on an ACTION_VIEW
Intent
on that Uri
.
If PayPal does not offer a URL with GET parameters to accomplish what you want, then no, it is not possible.
CommonsWare
2010-01-28 14:25:47
Actually it looks like they do support get...it didn't expect they would.
jax
2010-01-28 17:08:32
Hello Jax, did you achieve to do it at the end ?
Hubert
2010-03-06 04:58:43
Yes, I used GET instead of post - passing each of the button variables (the form fields from the button you copy from paypal) in the query string.
jax
2010-05-10 17:26:03