-
Notifications
You must be signed in to change notification settings - Fork 532
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
Update deprecated api #411
Conversation
rareboe
commented
Jul 3, 2019
•
edited
Loading
edited
- remove IInAppBillingService.aidl file and added Google Play Billing Library.
- update deprecated API
- remove Warning:Configuration 'compile' replaced with 'implementation' - update targetSdkVersion 26 (Google Play requires that apps target API level 26 or higher) - remove IInAppBillingService.aidl file and Use the Google Play Billing Library - update deprecated API
@@ -782,11 +782,11 @@ public boolean consumePurchase(String productId) | |||
try | |||
{ | |||
TransactionDetails transaction = getPurchaseTransactionDetails(productId, cachedProducts); | |||
if (transaction != null && !TextUtils.isEmpty(transaction.purchaseToken)) | |||
if (transaction != null && !TextUtils.isEmpty(transaction.purchaseInfo.purchaseData.purchaseToken)) |
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.
what is the purpose of this change? can you elaborate
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 TransactionDetails.purchaseToken field has been deprecated. so used purchaseInfo.purchaseData.purchaseToken field.
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.
I bet behaviour will depend on the google play services version installed on a device.
I would do this in a non-breaking manner, checking for both old and new values
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 function use TransactionDetails instance.
TransactionDetails class constructor.
public TransactionDetails(PurchaseInfo info)
{
purchaseInfo = info;
productId = purchaseInfo.purchaseData.productId;
orderId = purchaseInfo.purchaseData.orderId;
purchaseToken = purchaseInfo.purchaseData.purchaseToken;
purchaseTime = purchaseInfo.purchaseData.purchaseTime;
}
so used purchaseInfo.purchaseData.purchaseToken field.
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.
@serggl Can we Merge ?
What about a new Release? |
done ✅ |
Thanks! Anything to pay attention to? Just update to 45? I read something about "Acknowledge purchases" that needs to be done in v3? |
@DennyWeinberg This issue solves the problem in the screenshot. #406 This issue maybe not application issue. Because this library is using version 3 or higher. I manage a lot of projects, and those warnings were mostly APIs that the server calls. |
@jin-conbus, thanks! So I think we all are not talking about the same topic, after checking #406 and #160. I'm not sure if you could leave a comment in the open issues to clarify and to make understand everybody whats going on...? Thanks again! |
@DennyWeinberg @jin-conbus @mustii82 DennyWeinberg is referring to this issue discussed on r/androiddev in his comment above:
The question is, if anjlab is now using Google Play Billing Library version 2.0 (in x.45 ?), then will we need to change our code to acknowledge purchases explicitly. Or is anjlab doing that somewhere already - if not, the usage guidelines should be updated, so a user can change their code that uses anjlab accordingly. References: https://www.reddit.com/r/androiddev/comments/bmvvey/in_app_billing_aidl_deprecated/ https://www.reddit.com/r/androiddev/comments/bsgfx6/play_store_automatic_refunds_after_72_hours/ https://developer.android.com/google/play/billing/billing_library_releases_notes
|
@DennyWeinberg @jin-conbus @mustii82 Also just to be clear about versions, and under what conditions the AIDL error was appearing for some developers:
I was not getting any error about use of AIDL when using: but the app was targeting API 27 - perhaps the AIDL error starts appearing when you target API 28 ? Or it appears if some developers were using some specific API call in anjlab ? |
@stereomatch use 'com.android.billingclient:billing:2.0.1' only bottom reason But we can still use the old method. |
@jin-conbus So if I understand it correctly, we have 3 different versions that maybe relevant to anjlab ?
The Google Play Developer API v2/v3 issue seems to be related to these threads: #402 https://github.com/idehub/react-native-billing/issues/160
The Google Play Billing library 1.2.2 is being used by both anjlab 1.0.44 and 1.0.45 ? That is, both use the AIDL method ? https://developer.android.com/google/play/billing/billing_library_releases_notes
I ask because your first comment above seems to suggest otherwise:
You also said:
So "IInAppBillingService" is only used when you are using the AIDL method (and Google Play Billing library 1.2.2) - correct ? Will anjlab be updated to stop using the AIDL method (and "IInAppBillingService"), and switch to Google Play Billing library 2.0 (which doesn't use AIDL) ? |
So if I understand it correctly, we have 3 different versions that maybe relevant to anjlab ? :
The Google Play Developer API v2/v3 issue seems to be related to these threads :
The Google Play Billing library 1.2.2 is being used by both anjlab 1.0.44 and 1.0.45 ? That is, both use the AIDL method ? :
I ask because your first comment above seems to suggest otherwise :
So "IInAppBillingService" is only used when you are using the AIDL method (and Google Play Billing library 1.2.2) - correct ? :
Will anjlab be updated to stop using the AIDL method (and "IInAppBillingService"), and switch to Google Play Billing library 2.0 (which doesn't use AIDL) ? :
|
Thanks. So clarifying further:
|
So this PR is still using aidl and purchase no need to be acknowledged yet? |
@xDragonZ that is my impression. |
* - update gradle version 3.1.0 - remove Warning:Configuration 'compile' replaced with 'implementation' - update targetSdkVersion 26 (Google Play requires that apps target API level 26 or higher) - remove IInAppBillingService.aidl file and Use the Google Play Billing Library - update deprecated API * sample project use annotations version 26.0.1 * revert compileSdkVersion and buildToolsVersion * revert gradle version