godotengine / godot-google-play-billing

Godot Android plugin for the Google Play Billing library
MIT License
138 stars 39 forks source link

Google Play Billing v 5.4.0 not availbe #51

Closed code-with-max closed 8 months ago

code-with-max commented 1 year ago

Google Play Billing v 5.4.0 in *.gdap dependencies not availbe now. I think must be using version 5.2.0 or 6.0.0

https://developer.android.com/google/play/billing/release-notes

NianoTT commented 1 year ago

@finepointcgi should be 5.2?

code-with-max commented 1 year ago

@finepointcgi should be 5.2?

Yes.

I make version with 5.2 and 17 Java

https://github.com/godotengine/godot-google-play-billing/pull/52

finepointcgi commented 1 year ago

We currently are using 5.2 in master I didn't upgrade us to Java 17 because I wanted to be in line with what the godot devs are using. I Believe this was completed in #45

code-with-max commented 1 year ago

We currently are using 5.2 in master I didn't upgrade us to Java 17 because I wanted to be in line with what the godot devs are using. I Believe this was completed in #45

Many use 11 java, it's ok. But the current version uses deprecated methods like getSKU.

Now the code from the master branch will not work due to errors and deprecated methods. To update versions, you had to use the billing-v5 branch, it is much newer.

Something like this: https://github.com/godotengine/godot-google-play-billing/pull/52

finepointcgi commented 1 year ago

What errors are you running into? I ran though and tested it and it worked on my end.

On Sun, Jun 18, 2023, 3:33 PM Max Parkhomenko @.***> wrote:

We currently are using 5.2 in master I didn't upgrade us to Java 17 because I wanted to be in line with what the godot devs are using. I Believe this was completed in #45 https://github.com/godotengine/godot-google-play-billing/pull/45

Many use 11 java, it's ok. But the current version uses deprecated methods like getSKU.

Now the code from the master branch will not work due to errors and deprecated methods. To update versions, you had to use the billing-v5 branch, it is much newer.

— Reply to this email directly, view it on GitHub https://github.com/godotengine/godot-google-play-billing/issues/51#issuecomment-1596244650, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3UWDHYSK2EIUAJY7WWDDLXL5JXHANCNFSM6AAAAAAZK52OKQ . You are receiving this because you were mentioned.Message ID: @.***>

NianoTT commented 1 year ago

@trash-max

But the current version uses deprecated methods like getSKU.

Now the code from the master branch will not work due to errors and deprecated methods. To update versions, you had to use the billing-v5 branch, it is much newer.

master/45 uses the new methods (product instead of sku and such) internally but keeps compatibility with the old 1.x plugins by exposing the old method names to Godot, so this isn't an issue.

@finepointcgi the only issue I see is the dependency in gdap file listing "com.android.billingclient:billing:5.4.0" instead of 5.2


Also, at one point it needs to be decided if we want to go on (Billing API 6 and further) by using the (then) current names/functions/return dictionaries like #36 does or keep a compatibility layer so old code will work like #45 does.

code-with-max commented 1 year ago

Also, at one point it needs to be decided if we want to go on (Billing API 6 and further) by using the (then) current names/functions/return dictionaries like #36 does or keep a compatibility layer so old code will work like #45 does.

@NianoTT With each new version, maintaining old methods will become more and more difficult.

New users will soon not be able to understand what kind of methods are used in the module. I think it's better to use compatible (same names) with the original google library. Yes, and versions of java and cradle are still better to use the current ones. I did a whole operation today to restore java 11 on my linux.

NianoTT commented 1 year ago

@trash-max

With each new version, maintaining old methods will become more and more difficult.

New users will soon not be able to understand what kind of methods are used in the module. I think it's better to use compatible (same names) with the original google library.

Not sure if I understand correctly as using a compatibility layers means "maintaining new methods" (the code itself has to use the current methods regardless, what we can do is add a compatibility layer on top to keep the same old method names and parameters as the old billing versions) - which indeed will become more difficulat as time goes on and the compatibility layer will become more and more complex.

code-with-max commented 1 year ago

Not sure if I understand correctly as using a compatibility layers means "maintaining new methods" (the code itself has to use the current methods regardless, what we can do is add a compatibility layer on top to keep the same old method names and parameters as the old billing versions) - which indeed will become more difficulat as time goes on and the compatibility layer will become more and more complex.

Yes that's right. Perhaps in this case you need support for "getSKU", but I think we need to add "getPRODUCT" method for compatibility.

piramidamsc commented 1 year ago

I hope that this nightmare will end soon, and a new release of the plugin will be released.

finepointcgi commented 1 year ago

For it to end we need to update #52 to have some form of backwards compatibility. I will be making a tutorial on how to use the plugin and set it up using the new method.

Once we get this settled we can get @akien-mga to get a release out.

So in my opinion granted I need someone who has permissions to weigh in.

Lets update #52 to have backwards compatibility

Lets update to billing 6.0. If we are updating to 5.2 and changing things going to 6 isn't that huge of a change its mostly removing the ability to unsub from code and requiring the user to go to google play to do it.

I've already updated #36 code to 6 and after removing the

@UsedByGodot
    public Dictionary updateSubscription(String oldToken, String sku, int prorationMode) {
        return purchaseInternal(oldToken, sku, prorationMode);
    }

method and a few other updates it seemed to work fine in my testing. Though I wasn't as in depth as I could have been.

NianoTT commented 1 year ago

Personally, I'd prefer to always keep compatibility with old plugins (so basically using 1.x API) but this might get us into trouble later if Google changes the API enough so that the compatibility conversion will be hard or impossible.

So far the changes in each Billing API version doesn't seem that drastic however, so maybe we can get along using that same format for the next years at least.

Would be nice to just be able to update the Plugin once per year and not change any code.

NianoTT commented 1 year ago

@finepointcgi Also to come back to the topic of this issue, "remote=["com.android.billingclient:billing:5.4.0"]" in GodotGooglePlayBilling.gdap doesn't work, it must be "5.2.0"

code-with-max commented 1 year ago

@NianoTT Agree, that's right.

Maybe we can move #52 to a separate branch like #36? Name it, for example, "billing-v5-2", and then do not merge in to master. There will then be a main plug-in with support for old methods, and the ability to choose a new version.

@finepointcgi You a making good video.

finepointcgi commented 1 year ago

@finepointcgi Also to come back to the topic of this issue, "remote=["com.android.billingclient:billing:5.4.0"]" in GodotGooglePlayBilling.gdap doesn't work, it must be "5.2.0"

I have put out a pr on this #53 that was my fault

piramidamsc commented 1 year ago

I think we need to update the master branch to google billing version 6.0.0 so that the newly arrived developers do not have dissonance.You also need to update the documentation and plugins to the end by replacing the querySkuDetails() method with queryProductDetails() so that there would be no confusion.10 months have passed since the google billing api update, almost a year, and we still can't come to a common denominator.I hope that this issue will be resolved in the near future, otherwise young developers who do not pick at the sources will be forced to return to the Unity engine.

JEuler commented 10 months ago

Hey guys, so, what should I use to be able to integrate in-app for Godot 4.1? I have 17 java, and for the 5.2 branch from @trash-max I receive this on gradlew build:

image

OS is Windows.

code-with-max commented 10 months ago

@JEuler This is probably some kind of local Windows issue. I can't tell you exactly right now. I have compiled for you the plugin files needed to work in Godot 4.1.1 https://github.com/trash-max/godot-google-play-billing/releases/tag/v1.0.0.0

Черкни мне на почту, подскажу че как.

JEuler commented 10 months ago

Thank you so much! Спасибос! Напишу попозже, попробую забилдить на маке сначала тоже, а потом с гайдом побалуюсь. https://docs.godotengine.org/en/stable/tutorials/platform/android/android_in_app_purchases.html

JEuler commented 10 months ago

All is working fine! Thank you so much! Большое спасибо!

akien-mga commented 8 months ago

Fixed by #53.