In Billing V3 application, onActivityResult is not called

I implemented a new IAB in my application, but when I tested it on two different devices, the result was different in the S3 galaxy, the flow was excellent, but on the S1 galaxy (gt-i9000), after purchasing the onActivityResult method isn’t and the application will restart.

any suggestions?

+4
source share
3 answers

I had the same problem, in my case the reason was that I had a flag set in the intent that triggered the action in which the purchase process was located

i.addFlags (Intent.FLAG_ACTIVITY_NO_HISTORY);

after deleting the flag it works, I assume that this is because when startIntentSenderForResult starts the purchase interface, the activity is destroyed, it is not saved in the history, and for some reason there is no point in processing onActivityResult

+4
source

Do you use TABActivity? If the answerrer is yes, then the procedure is slightly different. onActvityResult will be called for the parent class, which is your activity that extends TABActivity, I don’t know why, but it seems that the parent cathcing is onActivityResult. So your code for startActvityForResult or startIntentSenderForResult should be in this actvity.

I used this link and made some changes according to my application and it works

onActivityResult is never called in TabActivity

0
source

My gremlin used a negative requestCode for this problem. This violates the mechanism for dispatching results.

0
source

All Articles