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

Support for GetPurchaseHistory #414

Merged
merged 3 commits into from
Jul 23, 2019

Conversation

syndarin
Copy link
Contributor

New API for BillingProcessor:
isRequestBillingHistorySupported - to check if request purchase history supported
getPurchaseHistory - to request purchase history

isRequestBillingHistorySupported - to check if request purchase history supported
getPurchaseHistory - to request purchase history
@syndarin syndarin mentioned this pull request Jul 19, 2019
throw new RuntimeException("Unsupported type " + type);
}

IInAppBillingService billing = billingService;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need a local var here?

Copy link
Contributor Author

@syndarin syndarin Jul 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this.billingService becomes null if service disconnects. So it is possible to get NPE if method called in secondary thread.

@@ -489,6 +490,42 @@ public boolean isOneTimePurchaseWithExtraParamsSupported(Bundle extraParams)
return isOneTimePurchaseExtraParamsSupported;
}

/**
* Checks does API support version 6 required to request purchase history
Copy link
Member

@serggl serggl Jul 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets change this descripton to Checks if API supports version 6 which required to request purchase history.

I ❤️ the descriptions in this PR BTW

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Member

@serggl serggl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, with one small request.
Can we also add a section to README describing these new two functions?

@@ -238,6 +238,25 @@ public final Date purchaseTime;
public final PurchaseInfo purchaseInfo;
```

## Getting Purchase History
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@serggl serggl merged commit f358431 into anjlab:master Jul 23, 2019
@syndarin
Copy link
Contributor Author

@serggl Thank you for accepting & merging PR. Can we expect updated artifact soon? (1.0.46 I suppose)

@serggl
Copy link
Member

serggl commented Jul 23, 2019

1.1.0 was just deployed

@jonboyandbailey472
Copy link

Good work yall

showdpro pushed a commit to showdpro/android-inapp-billing-v3 that referenced this pull request Jul 13, 2021
* New API for BillingProcessor:
isRequestBillingHistorySupported - to check if request purchase history supported
getPurchaseHistory - to request purchase history

* Updated code according to checkstyle

* Updated README to cover new API with getPurchaseHistory.
showdpro pushed a commit to showdpro/android-inapp-billing-v3 that referenced this pull request Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants