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
}
}