Android in-App purchase: The item you were attempting to purchase could not be found



  • I am trying to implement a full-featured in-App purchase and started with the Hangman example. I uploaded to my Google Dev account, created the in-App Products, sideloaded the App to a android device with a different account which has testing access configured in the Dev settings.

    Hangman works great.

    However, my own app seems to connect to th Google Play client on the device, opens a popup with the error "The item you were attempting to purchase could not be found"

    The significant difference between the two is that I am trying to pass a string to JNI that represents the Product ID of the in-App product.

    @
    void CelebrityManager::buyCelebrity(QString celebPack)
    {
    QAndroidJniObject s1 = QAndroidJniObject::fromString(celebPack);

    QAndroidJniObject::callStaticMethod<void>("com/uncutvideo/celebrify/CelebrifyActivity",
                                              "buyCelebrity",
                                              "(Ljava/lang/String;)V",
                                              s1.object<jstring>() );
    

    }
    @

    This method appears to be called successfully. But here are the relevent Logcat,

    @
    05-28 13:47:20.680: D/Qt(6562): ....\beautifyProWidgets\src\resourcemanager.cpp:198 (QString ResourceManager::getGalleryDir(QString)): Pictures directory is: :/content/RunwayModels_F1
    05-28 13:47:20.690: D/Qt(6562): ....\beautifyProWidgets\src\viewportwidget.cpp:360 (void ViewportWidget::selectNewStoreImage()): 4 images found in category: :/content/RunwayModels_F1
    05-28 13:47:20.750: D/Qt(6562): qml\qdeclarativeengine.cpp:1929 (static QScriptValue QDeclarativeEnginePrivate::consoleLog(QScriptContext*, QScriptEngine*)): analysis ended
    05-28 13:47:26.290: D/Qt(6562): ....\beautifyProWidgets\src\imageselectiondialog.cpp:167 (void ImageSelectionDialog::newImageSelected()): image selected 0 , 0
    05-28 13:47:26.340: D/Finsky(5349): [1206] InAppBillingUtils.getPreferredAccount: com.uncutvideo.celebrify: Account from first account - [SkhvGyKNYVrYP7EILRmnV0nia9o]
    05-28 13:47:26.340: D/Finsky(5349): [1206] InAppBillingUtils.getPreferredAccount: com.uncutvideo.celebrify: Account from first account - [SkhvGyKNYVrYP7EILRmnV0nia9o]
    05-28 13:47:26.350: D/Finsky(5349): [1206] InAppBillingUtils.getPreferredAccount: com.uncutvideo.celebrify: Account from first account - [SkhvGyKNYVrYP7EILRmnV0nia9o]
    05-28 13:47:26.410: D/Qt(6562): ....\beautifyProWidgets\src\celebritymanager.cpp:313 (void CelebrityManager::requestCelebrity(QString)): Sent request purchase to store: "runwaymodels_f1"
    05-28 13:47:26.410: D/Qt(6562): ....\beautifyProWidgets\src\imageselectiondialog.cpp:171 (void ImageSelectionDialog::newImageSelected()): all done
    05-28 13:47:26.510: D/Finsky(5349): [1] CarrierParamsAction.createCarrierBillingParameters: Carrier billing config is null. Device is not targeted for DCB 2.
    05-28 13:47:26.510: E/Finsky(5349): [1229] FileBasedKeyValueStore.delete: Attempt to delete 'paramsFDDuvDn2R12U8fZoIv-xLg' failed!
    05-28 13:47:26.870: D/Finsky(5349): [1] PurchaseFragment.handleError: Error: PurchaseError{type=2 subtype=0}
    05-28 13:47:26.870: D/Finsky(5349): [1] PurchaseFragment.fail: Purchase failed: PurchaseError{type=2 subtype=0}
    05-28 13:48:02.050: D/Finsky(5349): [1] CarrierParamsAction.createCarrierBillingParameters: Carrier billing config is null. Device is not targeted for DCB 2.
    05-28 13:48:02.050: E/Finsky(5349): [1229] FileBasedKeyValueStore.delete: Attempt to delete 'paramsFDDuvDn2R12U8fZoIv-xLg' failed!
    @

    I think my string "runwaymodels_f1" may not be passed correctly.

    Making this work is essential for a non-trivial application using in-App purchase.
    Any ideas?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.