刚刚做亚马逊的iap时遇到各种不了解(特别是英文很差),把制作中遇到的问题记录一下
刚做,不喜欢看文档,直接照着samples来,结果各种问题
1、
对于测试的json 需要放置在 /mnt/sdcard/amazon.sdktester.json 这个位置,否则会出现以下错误
com.amazon.testclient.TestClientException: JSON file does not exist on the device's external storage
参考:https://developer.amazon.com/sdk/in-app-purchasing.html
amazon.sdktester.json 说明:
# Format for Subscription Items:
#
# "SKU":{
# "itemType": "ENTITLED|CONSUMABLE",
# "price": item_price,
# "title": item_title,
# "description": item_description,
# "smallIconUrl": "http://path_to_image",
# "subscriptionParent": "parentSKU"
# }
2、
Unable to start service Intent{ act=com.amazon.testclient.iap.purchase flg=0x10000000 (has extras) }: not found
当testclist测试没问题后,准备验证下正式的包能否从服务器获取正确的计费信息,结果出现上述错误
也是纳闷了很久,网上各种查找才明白为什么还是报错testclient的错
亚马逊与google pay不同,亚马逊需要应用程序提交并且通过后才能从服务器获取,所以在那之前,你只有选择购买调试和测试是使用亚马逊测试仪应用它模拟了亚马逊商店。
参考:https://developer.amazon.com/sdk/in-app-purchasing/documentation/testing-iap.html