Skip to content
This repository was archived by the owner on Oct 20, 2020. It is now read-only.

Make sure to call BillingProcessor::handleActivityResult()#95

Closed
wasedaigo wants to merge 1 commit intoidehub:masterfrom
wasedaigo:master
Closed

Make sure to call BillingProcessor::handleActivityResult()#95
wasedaigo wants to merge 1 commit intoidehub:masterfrom
wasedaigo:master

Conversation

@wasedaigo
Copy link

I found that this library never calls BillingProcessor::handleActivityResult(). It seems calling this method is absolutely necessary, but I could not find anywhere in the codebase calling.

handleActivityResult() does important things such as calling onProductPurchased, reportBillingError(), write purchaseData to the cache, so not calling this is critical.

This PR fixed the following problems for me:

  1. The first purchase() returns true, but the second purchase returns transactionDetails
  2. listOwnedProducts() is not up-to-date right after calling purchase()

I think there is a good chance I am misunderstanding something, in that case please let me know what I am doing wrong. At least it is true that I was having the issue 1&2.

I am using react-native 0.52.0 & react-native-billing: 2.5.0

@wasedaigo wasedaigo changed the title Make sure to call handleActivityResult() of BillingProcessor Make sure to call BillingProcessor::handleActivityResult() Jan 26, 2018
@cbrevik
Copy link
Member

cbrevik commented Jan 29, 2018

Thanks for this PR; but I've tried to fix it in another way. Can you re-test with 2.6.0?

@wasedaigo
Copy link
Author

@cbrevik Ok, I will give a try tomorrow. Please wait.

@wasedaigo
Copy link
Author

Confirmed your fix is working

@wasedaigo wasedaigo closed this Jan 30, 2018
@lock
Copy link

lock bot commented Jan 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants