libgdx / gdx-pay

A libGDX cross-platform API for InApp purchasing.
Apache License 2.0
225 stars 83 forks source link

gdx-pay-android-googlebilling uses an outdated version of com.android.billingclient #261

Closed prineside closed 6 months ago

prineside commented 6 months ago

Issue details, reproduction steps/code

Using this library on Android 14 (SDK 34) throws an exception listed below. As mentioned on the Android Developers website, support for SDK 34 is added in version 6.0.1 of the Google Pay Billing library but gdx-pay uses version 6.0.0. Quote from the top of that page:

  1. If your app is targeting Android 14 or higher, you must update to PBL 5.2.1 or PBL 6.0.1 or higher.

Version of gdx-pay and/or relevant dependencies

gdx-pay 1.3.6, which depends on com.android.billingclient:billing:6.0.0 (here)

Stacktrace

java.lang.SecurityException: com.prineside.tdi2.debug: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
    at android.os.Parcel.createExceptionOrNull(Parcel.java:3057)
    at android.os.Parcel.createException(Parcel.java:3041)
    at android.os.Parcel.readException(Parcel.java:3024)
    at android.os.Parcel.readException(Parcel.java:2966)
    at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5684)
    at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1852)
    at android.app.ContextImpl.registerReceiver(ContextImpl.java:1792)
    at android.app.ContextImpl.registerReceiver(ContextImpl.java:1780)
    at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:755)
    at com.android.billingclient.api.zzg.zzc(com.android.billingclient:billing@@6.0.0:1)
    at com.android.billingclient.api.zzh.zze(com.android.billingclient:billing@@6.0.0:3)
    at com.android.billingclient.api.BillingClientImpl.startConnection(com.android.billingclient:billing@@6.0.0:48)
    at com.badlogic.gdx.pay.android.googlebilling.PurchaseManagerGoogleBilling.startServiceConnection(PurchaseManagerGoogleBilling.java:78)
    at com.badlogic.gdx.pay.android.googlebilling.PurchaseManagerGoogleBilling.install(PurchaseManagerGoogleBilling.java:61)

Please select the affected platforms and payment service implementation

keesvandieren commented 6 months ago

Thanks! I will upgrade it to 6.0.1 shortly. I think no code changes are needed? @prineside where you able to resolve this by upgrading it to 6.0.1 manually?

keesvandieren commented 6 months ago

I'm testing it with the current 6.0.0 on an app with subscriptions on a Pixel 7 Pro simulator. I'm able to start the billing client, able to come into here:

image

Will still do the 6.0.1 upgrade though

keesvandieren commented 6 months ago

Resolved in 1.3.7