简体   繁体   中英

android google play billing library v2.0.3 acknowledgePurchase failed with error code 5 in Android Q (api 29)

I've followed the google sample code and it's failing to acknowledge non consumable product purchase and is getting refunded, only on Android Q (api 29).

returned error is code 5 , which is DEVELOPER_ERROR which defines as "Invalid arguments provided to the API. This error can also indicate that the application was not correctly signed or properly set up for In-app Billing in Google Play, or does not have the necessary permissions in its manifest" in documentation.

https://developer.android.com/google/play/billing/billing_library_overview#acknowledge

Any idea how this is happening ? It's working well in other Android version phones.

After trying out many options, Finally found an answer.

I was trying to acknowledge already acknowledged purchases. So, old android versions were basically accepting that, and in Android Q, it returns an error. So I checked for purchase.isAcknowledged and problem is solved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM