Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Play Billing v 5.4.0 not availbe #51

Closed
code-with-max opened this issue Jun 18, 2023 · 21 comments · Fixed by #53
Closed

Google Play Billing v 5.4.0 not availbe #51

code-with-max opened this issue Jun 18, 2023 · 21 comments · Fixed by #53

Comments

@code-with-max
Copy link

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
Copy link

NianoTT commented Jun 18, 2023

@finepointcgi should be 5.2?

@code-with-max
Copy link
Author

@finepointcgi should be 5.2?

Yes.

I make version with 5.2 and 17 Java

#52

@finepointcgi
Copy link
Contributor

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
Copy link
Author

code-with-max commented Jun 18, 2023

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:
#52

@finepointcgi
Copy link
Contributor

finepointcgi commented Jun 18, 2023 via email

@NianoTT
Copy link

NianoTT commented Jun 18, 2023

@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
Copy link
Author

code-with-max commented Jun 18, 2023

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
Copy link

NianoTT commented Jun 18, 2023

@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
Copy link
Author

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
Copy link

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

@finepointcgi
Copy link
Contributor

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
Copy link

NianoTT commented Jun 19, 2023

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
Copy link

NianoTT commented Jun 19, 2023

@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
Copy link
Author

@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
Copy link
Contributor

@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
Copy link

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
Copy link

JEuler commented Sep 9, 2023

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
Copy link
Author

@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
Copy link

JEuler commented Sep 9, 2023

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

@JEuler
Copy link

JEuler commented Sep 10, 2023

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

@akien-mga
Copy link
Collaborator

Fixed by #53.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants