开发者

Opening the browser through an Intent and Posting data for PayPal

开发者 https://www.devze.com 2022-12-18 13:34 出处:网络
I want to press an Android button and automatically direct the user to the PayPal site with al开发者_如何学运维l the relevant data POSTED along also.Is this possible?If PayPal offers a URL where you c

I want to press an Android button and automatically direct the user to the PayPal site with al开发者_如何学运维l the relevant data POSTED along also. Is this possible?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消