From fd20804ed977b5410437fe0fb7eec3689c40b9dc Mon Sep 17 00:00:00 2001 From: Lukasz Kozakiewicz Date: Tue, 26 Sep 2017 16:39:48 +0200 Subject: [PATCH] =?UTF-8?q?InAppPurchases:=20=20=20when=20trying=20to=20bu?= =?UTF-8?q?y=20an=20already=20purchased=20item=20in=20Play=20Store,=20call?= =?UTF-8?q?=20success=20callback=20with=20=E2=80=9CItem=20already=20owned?= =?UTF-8?q?=E2=80=9D=20status.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../native/juce_android_InAppPurchases.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/juce_product_unlocking/native/juce_android_InAppPurchases.cpp b/modules/juce_product_unlocking/native/juce_android_InAppPurchases.cpp index da61ce003d..480c0c1c86 100644 --- a/modules/juce_product_unlocking/native/juce_android_InAppPurchases.cpp +++ b/modules/juce_product_unlocking/native/juce_android_InAppPurchases.cpp @@ -203,6 +203,11 @@ struct InAppPurchases::Pimpl : private AsyncUpdater, android.activity.callVoidMethod (JuceAppActivity.startIntentSenderForResult, intentSender.get(), requestCode, fillInIntent.get(), flagsMask.get(), flagsValues.get(), extraFlags.get()); } + else if (responseCode == 7) + { + // Item already bought. + notifyAboutPurchaseResult ({ {}, productIdentifier, juceString (getPackageName()), {}, {} }, true, statusCodeToUserString (responseCode)); + } } void restoreProductsBoughtList (bool, const juce::String&)