我正在尝试使用新的Android计费客户端库(1.0) https://developer.android.com/google/play/billing/billing_library.html
以前,在尝试执行购买时,可以选择向意图添加额外的数据。
然而,当使用新库时,事情已经被大大简化了。但是有没有办法将开发人员有效负载(额外的字符串)添加到购买流程中?
The 新版本计费库支持开发者payload.
您可以在确认购买或使用时设置开发者负载。
val client: BillingClient = ...
val listener: AcknowledgePurchaseResponseListener = ...
val acknowledgePurchaseParams =
AcknowledgePurchaseParams.newBuilder()
.setPurchaseToken(/* token */)
.setDeveloperPayload(/* payload */)
.build()
client.acknowledgePurchase(acknowledgePurchaseParams, listener)
在 Android Billing Library v2.0 中附加开发人员负载 https://developer.android.com/google/play/billing/billing_library_overview#attach_a_developer_payload
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)