Any Permissions?

It looks like my implementation of Amazon IAP is working as expected for both consumables and entitlements, including restore functions.

Before I finalize the device build, I’d like to confirm that Amazon IAP does not require any permissions (since it doesn’t mention any on the doc page: http://docs.coronalabs.com/daily/plugin/plugin.amazon.iap/index.html)  I’m about to comment out some permissions as I prepare for release build.

For example, with Google Play version (with IAP and push notification), I add all of the following:

“com.android.vending.BILLING”,

“android.permission.GET_ACCOUNTS”,

“android.permission.RECEIVE_BOOT_COMPLETED”,

“com.google.android.c2dm.permission.RECEIVE”,

“.permission.C2D_MESSAGE”,

I’m assuming I don’t need to keep any of the above for Amazon IAP to work.

Incidentally, I do have the following for all Android builds:

“android.permission.INTERNET”,

“android.permission.ACCESS_WIFI_STATE”,

“android.permission.ACCESS_NETWORK_STATE”,

These are needed for me to display ads and what not.   But do we also need internet permission for Amazon IAP to work?  (If we do, it might be a good idea to add the basic permissions required in the doc page.)

Naomi

Okay, it looks like I definitely need some of the permissions added.  When I included the following, Amazon IAP appears to work:

“com.android.vending.BILLING”,

“android.permission.GET_ACCOUNTS”,

“android.permission.INTERNET”,

“android.permission.ACCESS_WIFI_STATE”,

“android.permission.ACCESS_NETWORK_STATE”,

Please let me know if there’s anything else I should include.

Thank you.

Naomi

Hi Naomi,

You should not be required to specify any additional permissions to use the Amazon IAP Plugin.  Does the plugin not work when you remove the permissions you mention? 

-Preston

@Preston, thank you for getting back to me.  I appreciate it.

I generated another build without “com.android.vending.BILLING” and “android.permission.GET_ACCOUNTS”, and it works as it should this time.   I still have the INTERNET and ACCESS_WIFI_STATE and ACCESS_NETWORK_STATE, though.

The problem I encountered earlier was with event.state “restore” in the middle of a game (i.e., dismissing the IAP alert about an entitlement already purchased, which ended up with an activity indicator spinning forever.)  I might have not installed the final device build when checking the release build when I encountered the problem.

BTW, I’m curious as to why Amazon IAP works without INTERNET permission.  Does not app need to retrieve event data from Amazon server (and does it not need the internet access)?  Or does it simply access internet without requiring permission?

Thanks again.

Naomi

Hi Naomi,

The Amazon IAP Plugin and Amazon In-App Purchasing SDK operate by communicating with the Amazon Appstore(or Amazon SDK Tester during development) on the device itself.The Amazon Appstore itself is what actually communicates to Amazon’s servers to complete the transaction and results are relayed back through this same interface. The plugin adds an Android broadcast receiver in the AndroidManifest.xml to enable this. There is more information in the Amazon In-App Purchasing documentation here

-Preston

Hi Preston, thank you for the details and the link.  I appreciate it.

Naomi

Okay, it looks like I definitely need some of the permissions added.  When I included the following, Amazon IAP appears to work:

“com.android.vending.BILLING”,

“android.permission.GET_ACCOUNTS”,

“android.permission.INTERNET”,

“android.permission.ACCESS_WIFI_STATE”,

“android.permission.ACCESS_NETWORK_STATE”,

Please let me know if there’s anything else I should include.

Thank you.

Naomi

Hi Naomi,

You should not be required to specify any additional permissions to use the Amazon IAP Plugin.  Does the plugin not work when you remove the permissions you mention? 

-Preston

@Preston, thank you for getting back to me.  I appreciate it.

I generated another build without “com.android.vending.BILLING” and “android.permission.GET_ACCOUNTS”, and it works as it should this time.   I still have the INTERNET and ACCESS_WIFI_STATE and ACCESS_NETWORK_STATE, though.

The problem I encountered earlier was with event.state “restore” in the middle of a game (i.e., dismissing the IAP alert about an entitlement already purchased, which ended up with an activity indicator spinning forever.)  I might have not installed the final device build when checking the release build when I encountered the problem.

BTW, I’m curious as to why Amazon IAP works without INTERNET permission.  Does not app need to retrieve event data from Amazon server (and does it not need the internet access)?  Or does it simply access internet without requiring permission?

Thanks again.

Naomi

Hi Naomi,

The Amazon IAP Plugin and Amazon In-App Purchasing SDK operate by communicating with the Amazon Appstore(or Amazon SDK Tester during development) on the device itself.The Amazon Appstore itself is what actually communicates to Amazon’s servers to complete the transaction and results are relayed back through this same interface. The plugin adds an Android broadcast receiver in the AndroidManifest.xml to enable this. There is more information in the Amazon In-App Purchasing documentation here

-Preston

Hi Preston, thank you for the details and the link.  I appreciate it.

Naomi