Android Question Update to a newer version of Google Play Billing Library ... but I use v7 lib

SDFP Studio

Member
Licensed User
Hello
Since yesterday I have a message in the console that tells me that I must update Google Play Billing to v6 or higher.
But my app uses the v7 library : v7.00 - Based on Google Play Billing v7.00


Anyone else have this message?
Thanks
Francis
 

SDFP Studio

Member
Licensed User
Update sent this morning, still the warning

Update to a newer version of Google Play Billing Library to prevent your updates from being rejected. Your app uses a version of Google Play Billing Library that will be deprecated soon

Maybe it is caused by that code ?

B4X:
ProductDetailsParamsBuilder = ProductDetailsParamsBuilder.InitializeStatic("com.android.billingclient.api.BillingFlowParams.ProductDetailsParams").RunMethod("newBuilder", Null)
BillingFlowParamsBuilder = BillingFlowParamsBuilder.InitializeStatic("com.android.billingclient.api.BillingFlowParams").RunMethod("newBuilder", Null)
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
I check my Play Console. I received 2 messages.

1. We need to target Android 14 (API level 34) or higher
2. App must use Google Play Billing Library version 6.0.1 or later

I am also using GooglePlayBilling v7.00



I hope @Erel sees this.
 
Upvote 0

asales

Expert
Licensed User
Longtime User
I checked the Policy Status and I have an app with 2 warnings: SDK 34 and Play Billing 7.
I updated the app now and I'm still waiting to the publish to verify if the warnings is disappear or don't.
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I'm getting the same message from Google and I am also using v7 of Google billing.

Not sure what the problem is.
 
Upvote 0

SDFP Studio

Member
Licensed User
Do you also declare objects manually like I do ?

B4X:
ProductDetailsParamsBuilder = ProductDetailsParamsBuilder.InitializeStatic("com.android.billingclient.api.BillingFlowParams.ProductDetailsParams").RunMethod("newBuilder", Null)
BillingFlowParamsBuilder = BillingFlowParamsBuilder.InitializeStatic("com.android.billingclient.api.BillingFlowParams").RunMethod("newBuilder", Null)

Maybe that kind of declaration is relative to old versions ?
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
This code is essential for LaunchBillingFlow
I don't think you should exclude it if you are using Subscriptions.

If we read the guideline Learn how to migrate to Google Play Billing Library 7
I think the library should explicitly specify the version.
B4X:
dependencies {
    def billingVersion = 7.0.0

    implementation "com.android.billingclient:billing:$billingVersion"
}

Which should be updated in line #68 and #69 in https://github.com/AnywhereSoftware...oftware/b4a/objects/BillingClientWrapper.java,
B4X:
@Version(5.21f)
@DependsOn(values = { "billing-5.2.1.aar" })

This is just my wild guess.
 
Last edited:
Upvote 0

Scantech

Well-Known Member
Licensed User
Longtime User
If i remember this was similar issue that happened with the older library. Erel forgot to update the version label

Update: This is what he has

B4X:
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

@Version(7.0F)
@ShortName("BillingClient")
public class BillingClientWrapper {
   private String eventName;
   @Hide
   public BillingClient client;

B4X:
     AddApplicationText(
 <meta-data
            android:name="com.google.android.play.billingclient.version"
            android:value="5.2.1" />

        <activity
            android:name="com.android.billingclient.api.ProxyBillingActivity"
            android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:exported="false"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
)
AddManifestText(
 <queries>
        <intent>
            <action android:name="com.android.vending.billing.InAppBillingService.BIND" />
        </intent>
    </queries>
   )
 
Last edited:
Upvote 0

Jim McDougal

Member
Licensed User
I also updated to Billing Library v.7.0.0 and still got the "update needed" message. It looks like the latest version is v.7.0.1 which corrected this? My Libraries Manager shows the latest online version as v.7.0.1 but Core 12.80 still shows Billing Library v.7.0.0. Where can I get Billing Library v.7.0.1 to include as an additional library?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
My Libraries Manager shows the latest online version as v.7.0.1 but Core 12.80 still shows Billing Library v.7.0.0. Where can I get Billing Library v.7.0.1 to include as an additional library?
Note the bold comment in the Librarythread. Download in #1 of Librarythread btw

This is an internal library.

Guess what? DO NOT put it into the additional library folder. Instead replace the internal one.
 
Last edited:
Upvote 0

Jim McDougal

Member
Licensed User
Haven't noticed any change re: "update needed" message yet. Both "version" and "online" are showing as v.7.0.1. Guess I'll wait and see.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…