Forums

OverviewFelgo 2 Support (Qt 5) › In app purchase on amazon store cause the app crash

Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #23545

    NgapWei

    I am using the Soomla plugin to implement the in app purchase function on the amazon appstore, I can purchase the Entitlement IAP but the app crash immediate and I need to restart the phone or re-download the app in order to see the change.

     

    Felgo version : 3.5.0

    android abi : arm64a

    android api : 26-28

     

    Codes

     

    Store {
            id: store
    
            version: 1
            // Replace with your own custom secret
            secret: "h<T])n1apcW:P5O"
            // From Google Play Developer Console, when using Google Play billing service
            androidPublicKey: ""
    
            //onStorePurchased: {
            //    nativeUtils.displayMessageBox("Premium model purchased")
            //}
            onStorePurchaseCanceled: {
                nativeUtils.displayMessageBox("Store purchase canceled")
            }
    
            onInsufficientFundsError:{
                nativeUtils.displayMessageBox("Funds not enough")
            }
            onItemNotFoundError: {
                nativeUtils.displayMessageBox("Item not found")
            }
            onUnexpectedError: {
                nativeUtils.displayMessageBox("Unexpected error")
            }
    
            goods: [
                LifetimeGood {
                    id: transcribePremiumDetectionModel                
                    itemId: "some.id.0"
    
                    purchaseType: StorePurchase {
                        id: transcribePremiumDetectionModelPurchase
                        productId: transcribePremiumDetectionModel.itemId
                    }
                }
            ]
        }
    
    Column{
            id: mainColumn
    
            spacing: dp(5)
            anchors.horizontalCenter: parent.horizontalCenter
    
            function getObjectDetectionPremiumComments()
            {
                if(transcribePremiumDetectionModel.purchased){
                    return qsTr("You bought premium model of [object detection]")
                }else{
                    return qsTr("Buy premium model of [object detection] by %1!").
                    arg(transcribePremiumDetectionModelPurchase.marketPriceAndCurrency)
                    //.arg(store.transcribePremiumDetectionModelPurchase.marketPriceAndCurrency)
                }
            }
    
            AppText {
                wrapMode: Text.NoWrap
                color: "black"
                text: mainColumn.getObjectDetectionPremiumComments()
            }
    
            AppButton{
    
                text: qsTr("Purchase premium model")
                onClicked: {                
                    store.buyItem(transcribePremiumDetectionModel.itemId)
                }
                minimumWidth: root.width * 0.8
                textSize: sp(14)
                visible: !transcribePremiumDetectionModel.purchased
    
                anchors.horizontalCenter: parent.horizontalCenter
            }
        }

     

     

     

    #23583

    Alex
    Felgo Team

    Hi,

    does this issue still persist for you? I forwarded it to the plugin development team in order to try to reproduce it.

    Best,
    Alex

    #23590

    NgapWei

    Yap, still persist, thanks for you helps.

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support