有没有办法在 Android 上以编程方式单击“使用 Android Pay 购买”按钮?我找不到方法来做到这一点,因为该按钮是在 SupportWalletFragment 内呈现的。
This guide似乎表明这是可能的。
最佳答案
我认为您实际上无法以编程方式执行 SupportWalletFragment 的点击,但您可以使用以下方法以编程方式启动 Android Pay 流程:
Wallet.Payments.loadMaskedWallet(googleApiClient, maskedWalletRequest, requestCode);
有关支付 API 的详细信息: https://developers.google.com/android/reference/com/google/android/gms/wallet/Payments.html#top_of_page
关于Android Pay - 以编程方式单击 "Buy Now"按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35638176/