question

robin avatar image
robin asked

KF HD7 - SDK Tester 'File doesn't exist or can't be opened' error

Clicking on any of the three orange buttons in SDK tester produce error 'File doesn't exist or can't be opened' Intermediate Java and Android developer - learning hybrid Html5 WebView apps Consumable sample app does load and interstitial consumable purchase dialog does render SDK Tester ver 1.0 just d/l from SDK adb install -r AmazonSDKTester.apk 2135 KB/s (205010 bytes in 0.093s) pkg: /data/local/tmp/AmazonSDKTester.apk Success Using file from SDK amazon.sdktester.json KindleSDK\Android\InAppPurchasing\samples\SampleIAPConsumablesApp u/l push using adb https://developer.amazon.com/sdk/in-app-purchasing/documentation/testing-iap.html /mnt/sdcard/amazon.sdktester.json Verified /mnt/sdcard/ using ES3 and viewed Json content for 'orange' in ES3 editor Only ever see Fig. 2: SDK Tester Home Page https://developer.amazon.com/sdk/in-app-purchasing/documentation/testing-iap.html On some presses, immediately following, is the launch of Kingsoft Office [ WHY? ] 01-27 14:11:57.654: I/ActivityStack(206): START {act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] cmp=cn.wps.moffice_eng/cn.wps.moffice.documentmanager.PreStartActivity2 (has extras)} from pid 18684 01-27 14:11:57.654: V/ActivityStack(206): Prepare open transition: starting ActivityRecord{41bda178 cn.wps.moffice_eng/cn.wps.moffice.documentmanager.PreStartActivity2} 01-27 14:11:57.661: V/ActivityStack(206): Prepare open transition: prev=ActivityRecord{41e8f150 com.amazon.mas.test/com.amazon.testclient.MainActivity} Tried uninstall - verify - then reinstall Tried different amazon.sdktester.json Tried 'Clear Data' button under 'Application Details' Unable to continue testing with SDK and consumables until this is resolved. Ideas? Similar to this post https://forums.developer.amazon.com/forums/thread.jspa?threadID=2269 KF HD7 Latest ver 7.4.6_user_4620220 Robin
fire tablet
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Robin, Can you please post the relevant ADB logs while the error is reported. Are you getting below error at this time? open failed: EACCES (Permission denied) If yes, you need to do below steps. 1. Download apk tool from http://code.google.com/p/android-apktool/ 2. Decompile the SDK tester apk. 3. Open the AndroidManifest.xml in the decompiled apk folder and add below permission there. 4. Recompile the folder to an apk by using apk tool given. 5. Sign the apk by using any valid certificate (your debug.keystore also will work) 6. Run the sample app. Depending upon the target you are selecting while building the project you might need the above permission to be defined in manifest. We will fix this issue in the subsequent SDK release. Thank you for your post.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Robin, Thanks a lot for bringing the issue into our notice. Now I see it. I am forwarding the issue to the concerned team. We will fix the issue in the subsequent release. For the now, I would request you to uninstall Kingsoft office while using SDK tester in your target device. But it's a temporary solution. We will fix it soon. Thanks again for reporting this.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Robin, The issue has been identified and fixed. The fix would be available with the subsequent release. Thanks.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

robin avatar image
robin answered
Thank you for updating the tester. Quid Pro Quo So that we developers may learn from this simple oversight, would you mind showing a small snippet of code that allowed this situation to occur? It would assist we developers in not making the same error in our own code prior to submission. I find it odd that it is possible to code a Java statement such that some other app would launch when tapping on a button inside an activity, which is not the original intended result. I did find two possible instances that coding incorrectly might cause that situation. Threads http://developer.android.com/guide/components/processes-and-threads.html "For instance, when the user touches a button on the screen, your app's UI thread dispatches the touch event to the widget, which in turn sets its pressed state and posts an invalidate request to the event queue. The UI thread dequeues the request and notifies the widget that it should redraw itself." Is this an example of what is going on? "Rule 2: do not access the Android UI toolkit from outside the UI thread" or was it missing meta-data for a StartActivity http://developer.android.com/training/basics/firstapp/starting-activity.html "However, intents can also be implicit, in which case the Intent does not specify the desired component, but allows any app installed on the device to respond to the intent as long as it satisfies the meta-data specifications for the action" Having a snippet of what not to do, and the corrected result would benefit us all. Thank you
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.