Hey all,
I’m at the end of my rope here. I have an app that is working correctly on iTunes and Google Play with IAP. On Kindle devices it works correctly using the local json file and test app method. But when I try and use it on the Amazon App store it never returns from UnityPurchasing.Initialize(). OnInitialized(blah) nor OnInitializedFailed() is never called. Some things I know are correct:
- I have used the menu option to set it to the Amazon App Store variant of android IAP. (I’ve even verified before build that the correct setting is in the json file that modifies).
- I know the device I’m testing on is online.
- I know the device I’m testing on has in app purchasing enabled in the store.
- I know the bundle, build, and version id are identical to what’s on the store now.
- I know the AndroidManifest.xml being used in the /Temp/Staging/ folder on build has the right provisions.
HALP!?!?! Can anyone point to anything that may help me trouble shoot this? I’ve dug all over the forums and internet to no avail.
Are you attempting to test against Amazon’s sandbox or locally using their app tester? Have you been through our configuration guide?
Please capture a trace from your device using ADB from when you launch your Application and post any relevant errors.
Ok, it was definitely in sandbox mode. But why? Snippet:
D/d (14554): In App Purchasing SDK - Sandbox Mode: PurchasingListener registered: com.unity.purchasing.amazon.AmazonPurchasing@41d45770
D/d (14554): In App Purchasing SDK - Sandbox Mode: PurchasingListener Context: com.unity3d.player.UnityPlayerActivity@41a969b8
I/Unity (14554): initializing UnityPurchasing
I/Unity (14554):
I/Unity (14554): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
I/Unity (14554):
D/Unity Purchasing Amazon(14554): RetrieveProducts 30
D/c (14554): In App Purchasing SDK - Sandbox Mode: sendGetUserDataRequest
As stated above:
- I have a Live app on the store.
- I am ensuring that the editor thinks it’s in Amazon Android Store mode.
- I’m ensuring that the AndroidManifest.xml file has the entries as per your and Amazons docs (Unity is building them, they’re not mine).
<receiver android:name="com.amazon.device.iap.ResponseReceiver">
<intent-filter>
<action android:name="com.amazon.inapp.purchasing.NOTIFY" android:permission="com.amazon.inapp.purchasing.Permission.NOTIFY" />
</intent-filter>
</receiver>
- And every other store I work with is working fine so it’s not the Unity code near as I can tell.
But clearly it thinks it’s in Sandbox mode. And I can’t find a single way in any docs to specify sandbox mode or not save from here:
Which as near as I can tell is telling me I shouldn’t be in sandbox mode because I have a live app that has items with the proper sku’s. But more importantly, I’m not even getting an initialize response right now because it thinks it’s in sandbox mode and I can’t figure out why or how to change it.
Also, the device I’m on doesn’t even have the Amazon App Tester or any type of product json on it.
Ok, this may be the issue:
http://stackoverflow.com/questions/28080331/amazon-inapp-purchase-still-runs-in-sandbox-mode-after-the-application-is-purcha
I’m testing using a locally installed build on top of an Amazon App Store installed build. It wasn’t clear to me that an app that wasn’t installed directly from the Amazon App Store would be in Sandbox mode. Verifying a Live App Test now, but this is sounding like the likely issue.
1 Like
Yes, you need to install it from the Amazon store for it to work against the live Amazon API.
1 Like