onIabPurchaseFinished never called.
Try adding this to the Activity that calls mHelper.launchPurchaseFlow(..)
:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Log.d(TAG, "onActivityResult(" + requestCode + "," + resultCode + "," + data);
// Pass on the activity result to the helper for handling
if (!mHelper.handleActivityResult(requestCode, resultCode, data)) {
// not handled, so handle it ourselves (here's where you'd
// perform any handling of activity results not related to in-app
// billing...
super.onActivityResult(requestCode, resultCode, data);
}
else {
Log.d(TAG, "onActivityResult handled by IABUtil.");
}
}
i just found out another important thing: the requestCode that is used to launch the purchase flow has to be >= 0!
i used "new Random().nextInt()" to generate a random requestCode, and sometimes it worked, sometimes it didn't. now i found out in the following documentation, that the requestCode should not be a negative number:
http://developer.android.com/reference/android/app/Activity.html#startActivityForResult%28android.content.Intent,%20int%29