-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Integrate the Google Play Billing Library into engine #17836
base: v3.8.5
Are you sure you want to change the base?
Conversation
|
* 这个字段已经废弃。 | ||
* 看看SERVICE_UNAVAILABLE将使用哪一个来代替此代码。 | ||
*/ | ||
SERVICE_TIMEOUT = -3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field is marked as deprecated in the google docs, does it need to be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, i think should remove it. But it is better to listen to the google guys' opinions too.
export class GooglePlayBilling { | ||
private _eventTarget: EventTarget = new EventTarget(); | ||
constructor () { | ||
if (!JSB || !jsb.billing) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return if non-JSB or jsb.billing is null, only in android platform jsb.billing is not null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should only work on google play build target.
2. Adjust the file name
@cocos-robot run test cases |
*/ | ||
readonly signature: string; | ||
|
||
readonly toStr: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name should be toString, but ts has an internal toString, so it's changed to toStr.
jintArray result = env->NewIntArray(size); | ||
jint* buf = new jint[size]; | ||
for (int i = 0; i < size; ++i) { | ||
buf[i] = productDetailsList[i]->hashCode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finding objects in Java using hashCode
* @en Represents the available purchase plans to buy a subscription product. | ||
* @zh 代表一次性购买产品的报价详情。 | ||
*/ | ||
readonly hashCode: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the comment for hashCode
wrong?
*/ | ||
readonly title: string; | ||
|
||
readonly toStr: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing API comment for toStr
|
||
bool jsb_register_all_billing(se::Object* obj) { // NOLINT | ||
se::Value nsVal; | ||
if (!obj->getProperty("jsb", &nsVal, true)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use another namespace, like gp
or googleplay
Re: #
https://developer.android.com/google/play/billing/integrate
https://developer.android.com/reference/com/android/billingclient/api/BillingClient?_gl=1*11tcdon*_up*MQ..*_ga*MjcyNzYxMzIuMTczMTM3NTA0MQ..*_ga_6HH9YJMN9M*MTczMTM3NTA0MS4xLjAuMTczMTM3NTA0MS4wLjAuNzA1NTQwMDMy
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: