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

Android: isAcknowledgedAndroid should be available for subscriptions #748

Closed
zs-doron opened this issue Oct 1, 2019 · 2 comments
Closed
Labels
🐛 bug Something isn't working

Comments

@zs-doron
Copy link
Contributor

zs-doron commented Oct 1, 2019

Version of react-native-iap

3.4.12

Version of react-native

0.60

Platforms you faced the error (IOS or Android or both?)

Android

Expected behavior

isAcknowledgedAndroid should be set for both SKU types to allow for cleanly checking whether a purchase should be acknowledged.

Actual behavior

isAcknowledgedAndroid is only set for SKU types "IAP", not for subscriptions. However, subscriptions need to be acknowledged, too (see Billing library documentation). Currently, you have to check the purchase's transactionReceipt to see if the purchase has been acknowledged, or always acknowledge the purchase.

        if (type.equals(BillingClient.SkuType.INAPP)) {
          item.putBoolean("isAcknowledgedAndroid", purchase.isAcknowledged());
        } else if (type.equals(BillingClient.SkuType.SUBS)) {
          item.putBoolean("autoRenewingAndroid", purchase.isAutoRenewing());
        }

Tested environment (Emulator? Real Device?)

Steps to reproduce the behavior

@zs-doron zs-doron changed the title Anndroid: isAcknowledgedAndroid should be available for subscriptions Android: isAcknowledgedAndroid should be available for subscriptions Oct 1, 2019
hyochan added a commit that referenced this issue Oct 1, 2019
@hyochan hyochan added the 🐛 bug Something isn't working label Oct 1, 2019
@hyochan hyochan closed this as completed in cc96a62 Oct 1, 2019
@hyochan
Copy link
Owner

hyochan commented Oct 1, 2019

Thanks for the issue! Fixed in 3.5.6. Consider giving PR for the next time 😀

@zs-doron
Copy link
Contributor Author

zs-doron commented Oct 3, 2019

Thanks, I wanted to discuss it first before fixing it, next time I will add a PR. See PR #752 to fix the typings related to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants