App freezes on 1st Generation Kindle Fire

I have only these lines from the SDK Tester or plugin:

D/PurchasingManager(10344): In App Purchasing SDK - Sandbox Mode: PurchasingObserver registered: plugin.amazon.iap.CoronaPurchasingObserver@4051ef70 I/PurchasingManager(10344): Purchasing Framework initialization complete. Build ID 1.0.3 I/AmazonSDKTester(10271): Init Complete. on line 8 of file:///android\_asset/web/js/index.js  

No SandboxRequestHandler or SandboxResponseHandler at all.

And the app works fine if I just comment out the inAppPurchases.storeInit() – which is what never completes – and the loadProducts() that is never reached. No Amazon store calls, everything works fine. The plugin still loads, I just don’t call it, and no freeze.

I’ve uninstalled and reinstalled Corona and moved up to build 1181. Nothing has changed. My app works fine as long as I don’t call the plugin’s store.init(). If I do, that call never returns and I’m frozen.

I’m unsure how to answer the question about the androidmanifest.xml, “Is the <receiver> tag nested under the <application> tag”.

Here’s the entirety of the manifest (I think – I’m not familiar with the aapt output format):

N: android=http://schemas.android.com/apk/res/android &nbsp; E: manifest (line=2) &nbsp;&nbsp;&nbsp; A: android:versionCode(0x0101021b)=(type 0x10)0x1 &nbsp;&nbsp;&nbsp; A: android:versionName(0x0101021c)="1.0" (Raw: "1.0") &nbsp;&nbsp;&nbsp; A: android:installLocation(0x010102b7)=(type 0x10)0x0 &nbsp;&nbsp;&nbsp; A: package="com.primeadvocate.docjournal" (Raw: "com.primeadvocate.docjournal") &nbsp;&nbsp;&nbsp; E: uses-sdk (line=13) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:minSdkVersion(0x0101020c)=(type 0x10)0x8 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:targetSdkVersion(0x01010270)=(type 0x10)0x10 &nbsp;&nbsp;&nbsp; E: uses-permission (line=17) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET") &nbsp;&nbsp;&nbsp; E: uses-permission (line=18) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.android.vending.CHECK\_LICENSE" (Raw: "com.android.vending.CHECK\_LICENSE") &nbsp;&nbsp;&nbsp; E: uses-permission (line=19) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.android.vending.BILLING" (Raw: "com.android.vending.BILLING") &nbsp;&nbsp;&nbsp; E: uses-feature (line=22) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:glEsVersion(0x01010281)=(type 0x11)0x10001 &nbsp;&nbsp;&nbsp; E: uses-feature (line=23) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="android.hardware.telephony" (Raw: "android.hardware.telephony") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:required(0x0101028e)=(type 0x12)0x0 &nbsp;&nbsp;&nbsp; E: application (line=32) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:label(0x01010001)="DocJournal" (Raw: "DocJournal") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:icon(0x01010002)=@0x7f020026 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: meta-data (line=37) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="targetedAppStore" (Raw: "targetedAppStore") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:value(0x01010024)="amazon" (Raw: "amazon") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: activity (line=44) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:theme(0x01010000)=@0x1030007 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:label(0x01010001)="DocJournal" (Raw: "DocJournal") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.ansca.corona.CoronaActivity" (Raw: "com.ansca.corona.CoronaActivity") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:launchMode(0x0101001d)=(type 0x10)0x2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:screenOrientation(0x0101001e)=(type 0x10)0x1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:configChanges(0x0101001f)=(type 0x11)0x4a0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: meta-data (line=50) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="supportsOrientationPortrait" (Raw: "supportsOrientationPortrait") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:value(0x01010024)=(type 0x12)0xffffffff &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: meta-data (line=51) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="supportsOrientationPortraitUpsideDown" (Raw: "supportsOrientationPortraitUpsideDo wn") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:value(0x01010024)=(type 0x12)0x0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: meta-data (line=52) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="supportsOrientationLandscapeRight" (Raw: "supportsOrientationLandscapeRight") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:value(0x01010024)=(type 0x12)0x0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: meta-data (line=53) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="supportsOrientationLandscapeLeft" (Raw: "supportsOrientationLandscapeLeft") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:value(0x01010024)=(type 0x12)0x0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: intent-filter (line=54) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: action (line=55) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: category (line=56) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: activity (line=62) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:theme(0x01010000)=@0x1030007 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.ansca.corona.CameraActivity" (Raw: "com.ansca.corona.CameraActivity") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:screenOrientation(0x0101001e)=(type 0x10)0x1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:configChanges(0x0101001f)=(type 0x11)0x4a0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: activity (line=66) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:theme(0x01010000)=@0x1030007 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.ansca.corona.VideoActivity" (Raw: "com.ansca.corona.VideoActivity") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:configChanges(0x0101001f)=(type 0x11)0x4a0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: activity (line=69) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:theme(0x01010000)=@0x1030007 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.ansca.corona.purchasing.StoreActivity" (Raw: "com.ansca.corona.purchasing.Store Activity") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:configChanges(0x0101001f)=(type 0x11)0x4a0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: activity (line=72) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:theme(0x01010000)=@0x1030007 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.facebook.LoginActivity" (Raw: "com.facebook.LoginActivity") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:configChanges(0x0101001f)=(type 0x11)0x4a0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: activity (line=75) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:theme(0x01010000)=@0x1030007 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.ansca.corona.facebook.FacebookFragmentActivity" (Raw: "com.ansca.corona.faceboo k.FacebookFragmentActivity") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:configChanges(0x0101001f)=(type 0x11)0x4a0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: provider (line=80) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.ansca.corona.FileContentProvider" (Raw: "com.ansca.corona.FileContentProvider") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:authorities(0x01010018)="com.primeadvocate.docjournal.files" (Raw: "com.primeadvocate.docjournal.file s") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: service (line=84) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.ansca.corona.CoronaService" (Raw: "com.ansca.corona.CoronaService") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: receiver (line=92) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.ansca.corona.SystemStartupBroadcastReceiver" (Raw: "com.ansca.corona.SystemStartupBroadcastReceiver") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: intent-filter (line=93) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: action (line=94) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="android.intent.action.BOOT\_COMPLETED" (Raw: "android.intent.action.BOOT\_COMPLETED") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: receiver (line=99) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.ansca.corona.notifications.AlarmManagerBroadcastReceiver" (Raw: "com.ansca.corona.notifications.AlarmManagerBroadcastReceiver") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: receiver (line=100) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.ansca.corona.notifications.StatusBarBroadcastReceiver" (Raw: "com.ansca.corona.notifications.StatusBarBroadcastReceiver") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: receiver (line=103) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.ansca.corona.notifications.GoogleCloudMessagingBroadcastReceiver" (Raw: "com.ansca.corona.notifications.GoogleCloudMessagingBroadcastReceiver") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:permission(0x01010006)="com.google.android.c2dm.permission.SEND" (Raw: "com.google.android.c2dm.permission.SEND") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: intent-filter (line=105) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: action (line=106) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.google.android.c2dm.intent.RECEIVE" (Raw: "com.google.android.c2dm.intent.RECEIVE") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: action (line=107) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.google.android.c2dm.intent.REGISTRATION" (Raw: "com.google.android.c2dm.intent.REGISTRATION") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: category (line=108) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.primeadvocate.docjournal" (Raw: "com.primeadvocate.docjournal") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: receiver (line=113) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.ansca.corona.purchasing.GoogleStoreBroadcastReceiver" (Raw: "com.ansca.corona.purchasing.GoogleStoreBroadcastReceiver") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: intent-filter (line=114) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: action (line=115) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.android.vending.billing.IN\_APP\_NOTIFY" (Raw: "com.android.vending.billing.IN\_APP\_NOTIFY") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: action (line=116) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.android.vending.billing.RESPONSE\_CODE" (Raw: "com.android.vending.billing.RESPONSE\_CODE") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: action (line=117) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.android.vending.billing.PURCHASE\_STATE\_CHANGED" (Raw: "com.android.vending.billing.PURCHASE\_STATE\_CHANGED") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: receiver (line=121) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.amazon.inapp.purchasing.ResponseReceiver" (Raw: "com.amazon.inapp.purchasing.ResponseReceiver") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: intent-filter (line=121) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E: action (line=121) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:name(0x01010003)="com.amazon.inapp.purchasing.NOTIFY" (Raw: "com.amazon.inapp.purchasing.NOTIFY") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A: android:permission(0x01010006)="com.amazon.inapp.purchasing.Permission.NOTIFY" (Raw: "com.amazon.inapp.purchasing.Permission.NOTIFY") &nbsp;

I have resolved the problem. Only for Amazon and not for Apple or Google, store.init() was never returning because, just before that call to store.init(), I was doing this. Something about these calls (the check() functions do DB reads and call showAlert() to pop up warnings under some circumstances) was causing the problem, because as soon as I moved these lines to AFTER the call to store.init(), everything worked fine:

systemEvents.addAction( "applicationResume", "checkForUpdate", checkForUpdate.check ) &nbsp;&nbsp; &nbsp;checkForUpdate.check() systemEvents.addAction( "applicationResume", "checkForBackup", checkForBackup.check ) &nbsp;&nbsp;&nbsp; checkForBackup.check()

systemEvents.addAction(…)

what does the function do? I can’t find it in the docs.

I totally forgot that it wasn’t a system call, it’s my own layer on top of Runtime:addEventListener( “system”, listener ). Those calls to addAction() are just adding to an array of functions that are run when an “applicationResume” system event occurs. But the explicit calls to checkForBackup.check() and checkForUpdate.check() actually do things right when called.

checkForBackup.check() just does a DB read and pops a native.showAlert() if the user hasn’t done a backup lately. I guess the showAlert() at that point could conceivably be an issue for the IAP plugin.

checkForUpdate.check() does this, which might also be the issue:

function checkForUpdate.check() &nbsp;&nbsp; &nbsp;network.request( "http://itunes.apple.com/lookup?id=" .. checkForUpdate.appId, "GET", checkForUpdate.checkListener,&nbsp; nil ) end &nbsp;

I am trying to implement Amazon IAP for corona enterprise but it’s not working.

I added in-app-purchasing-1.0.3.jar and plugin.amazon.iap.jar in libs folder on my android project also I added 

<receiver android:name = “com.amazon.inapp.purchasing.ResponseReceiver” >

        <intent-filter>
            <action android:name = “com.amazon.inapp.purchasing.NOTIFY”
                    android:permission = “com.amazon.inapp.purchasing.Permission.NOTIFY” />
        </intent-filter>
 </receiver>

in androidmanifest.xml file.

I installed the app and open the app it appears blank screen also installed amazonSDKtester.apk file.

I don’t know the problem why it’s not working.Please help me.

Note:

But when i build apk from corona sdk Simulator and test the app it’s working also Amazon inapp purchase working.

I am trying to implement Amazon IAP for corona enterprise but it’s not working.

I added in-app-purchasing-1.0.3.jar and plugin.amazon.iap.jar in libs folder on my android project also I added 

<receiver android:name = “com.amazon.inapp.purchasing.ResponseReceiver” >

        <intent-filter>
            <action android:name = “com.amazon.inapp.purchasing.NOTIFY”
                    android:permission = “com.amazon.inapp.purchasing.Permission.NOTIFY” />
        </intent-filter>
 </receiver>

in androidmanifest.xml file.

I installed the app and open the app it appears blank screen also installed amazonSDKtester.apk file.

I don’t know the problem why it’s not working.Please help me.

Note:

But when i build apk from corona sdk Simulator and test the app it’s working also Amazon inapp purchase working.