question

kaloisi avatar image
kaloisi asked

Development for FreeTime Apps

Is there any information about developing applications for Kindle FreeTime? I'm having an horrible experience so far. I have a very basic Android app that runs perfectly find in my android emulator, my other android devices, and in my primary account on the Kindle Fire.

But if I start the app via a FreeTime profile, the app immediately exists without anything useful in the logs..

07-17 20:30:38.045 135-135/? E/[EGL-ERROR]: egl_image* _egl_create_image_ANDROID_native_buffer(egl_display*, egl_context*, EGLClientBuffer, EGLint*, void*):593: CHUN try create image with crop 0,0,0,0
                                            [ 07-17 20:30:38.045   135:  135 E/         ]
                                            CHUN map external image rgb 1024 x 600
07-17 20:30:38.053 454-676/? W/ActivityManager: Input dispatching paused for current ActivityRecord: ActivityRecord{3217ca18 u14 org.aloisi.fuegomp3/.BlankActivity t660}
07-17 20:30:38.062 135-135/? E/[EGL-ERROR]: egl_image* _egl_create_image_ANDROID_native_buffer(egl_display*, egl_context*, EGLClientBuffer, EGLint*, void*):593: CHUN try create image with crop 0,0,0,0
                                            [ 07-17 20:30:38.062   135:  135 E/         ]
                                            CHUN map external image rgb 1024 x 600
07-17 20:30:38.090 165-165/? W/art: PreZygoteFork called when we already have a zygote space.
07-17 20:30:38.100 135-213/? I/[MALI][Gralloc]: usage: 0x933, format: 1 stride: 1024 vertical_stride: 600 size: 2457600
07-17 20:30:38.110 454-854/? I/ActivityManager: Start proc 11219:org.aloisi.fuegomp3/u14a67 for activity org.aloisi.fuegomp3/.BlankActivity
07-17 20:30:38.114 135-135/? E/[EGL-ERROR]: egl_image* _egl_create_image_ANDROID_native_buffer(egl_display*, egl_context*, EGLClientBuffer, EGLint*, void*):593: CHUN try create image with crop 0,0,0,0
                                            [ 07-17 20:30:38.114   135:  135 E/         ]
                                            CHUN map external image rgb 1024 x 600
07-17 20:30:38.178 454-10715/? D/BatteryStatsExtension.VitalEmitterBatteryAndTime: VitalEmitterBatteryAndTime.start(-): not runnable
07-17 20:30:38.190 11219-11219/? D/VendorDisplayManagerGlobalCallback: callGetInstance: nil
07-17 20:30:38.263 454-11238/? I/ActivityManager: addErrorToDropBox inserted hashcode=75f2efafed12fb79356405b13c9ce0ed111e0031 for eventType wtf.
07-17 20:30:38.268 454-759/? W/ActivityManager: getRunningAppProcesses: caller 1410067 does not hold REAL_GET_TASKS; limiting output
07-17 20:30:38.276 11219-11219/org.aloisi.fuegomp3 I/AndroidRuntime: To Report FATAL to activityManagerService
07-17 20:30:38.277 454-854/? I/ActivityManager: handleApplicationCrash
07-17 20:30:38.303 454-473/? I/CrashDescriptorUtil: addErrorToCommonLog Hash already present in file
07-17 20:30:38.306 454-854/? W/ActivityManager:   Force finishing activity 1 org.aloisi.fuegomp3/.BlankActivity
07-17 20:30:38.310 454-11239/? I/ActivityManager: addErrorToDropBox inserted hashcode=7e33ee2cb4956f0c3d60b754fb5fc6e0533456f4 for eventType crash.
07-17 20:30:38.311 135-211/? I/[MALI][Gralloc]: usage: 0x333, format: 1 stride: 368 vertical_stride: 360 size: 529920
07-17 20:30:38.312 135-135/? E/[EGL-ERROR]: egl_image* _egl_create_image_ANDROID_native_buffer(egl_display*, egl_context*, EGLClientBuffer, EGLint*, void*):593: CHUN try create image with crop 0,0,0,0
                                            [ 07-17 20:30:38.312   135:  135 E/         ]
                                            CHUN map external image rgb 360 x 360
07-17 20:30:38.320 454-474/? D/ActivityManager: Ignoring request to show crash dialog - MASTER_DISABLE_ANR_CRASH_DIALOGS_KEY set
07-17 20:30:38.321 11219-11219/? I/AndroidRuntime: Finished reporting FATAL to activityManagerService
07-17 20:30:38.339 454-473/? I/CrashDescriptorUtil: addErrorToCommonLog Hash already present in file
07-17 20:30:38.381 454-1997/? I/ActivityManager: Process org.aloisi.fuegomp3 (pid 11219) has died
07-17 20:30:38.383 454-1997/? D/BatteryStatsExtension.VitalEmitterBatteryAndTime: VitalEmitterBatteryAndTime.start(-): not runnable
07-17 20:30:38.385 454-480/? E/WindowState: getStack: Window{22d758a9 u0 Starting org.aloisi.fuegomp3} couldn't find taskId=660 Callers=com.android.server.wm.WindowState.getDisplayContent:796 com.android.server.wm.WindowState.getWindowList:1368 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:3042 com.android.server.wm.WindowManagerService.removeWindowLocked:2935 
07-17 20:30:38.385 454-480/? E/WindowState: getStack: Window{22d758a9 u0 Starting org.aloisi.fuegomp3} couldn't find taskId=660 Callers=com.android.server.wm.WindowState.getDisplayContent:796 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:3047 com.android.server.wm.WindowManagerService.removeWindowLocked:2935 com.android.server.wm.WindowManagerService.removeWindow:2857 
07-17 20:30:38.411 135-521/? I/[MALI][Gralloc]: usage: 0xf02, format: 1 stride: 1024 vertical_stride: 600 size: 2457600
07-17 20:30:38.416 135-213/? I/[MALI][Gralloc]: usage: 0xf02, format: 1 stride: 1024 vertical_stride: 600 size: 2457600
07-17 20:30:38.419 135-211/? I/[MALI][Gralloc]: usage: 0xf02, format: 1 stride: 1024 vertical_stride: 600 size: 2457600
07-17 20:30:38.419 135-211/? I/[MALI][Gralloc]: usage: 0xf02, format: 1 stride: 1024 vertical_stride: 600 size: 2457600
07-17 20:30:38.421 135-211/? I/[MALI][Gralloc]: usage: 0xf02, format: 1 stride: 1024 vertical_stride: 600 size: 2457600
07-17 20:30:38.438 454-2028/? W/InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@2da3d665 attribute=null, token = android.os.BinderProxy@3da5c21b
07-17 20:30:38.467 135-135/? E/[EGL-ERROR]: egl_image* _egl_create_image_ANDROID_native_buffer(egl_display*, egl_context*, EGLClientBuffer, EGLint*, void*):593: CHUN try create image with crop 0,0,0,0
                                            [ 07-17 20:30:38.467   135:  135 E/         ]
                                            CHUN map external image rgb 1024 x 600
07-17 20:30:38.584 135-135/? E/[EGL-ERROR]: egl_image* _egl_create_image_ANDROID_native_buffer(egl_display*, egl_context*, EGLClientBuffer, EGLint*, void*):593: CHUN try create image with crop 0,0,0,0
                                            [ 07-17 20:30:38.584   135:  135 E/         ]
                                            CHUN map external image rgb 1024 x 600
07-17 20:30:39.908 135-240/? I/hwcomposer: [DPY] UEventThread::threadLoop recv change@/devices/platform/battery/power_supply/battery
07-17 20:30:43.185 454-454/? D/ProxyReceiver: received intent amazon.intent.action.TASK_SWITCHED
07-17 20:30:43.188 454-11314/? D/ProxyReceiver: firing intent with action amazon.intent.action.TASK_SWITCHED_CMS_PROXY by proxy
fire tabletandroid
10 |5000

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

Nick Gardner avatar image
Nick Gardner answered

The main difference with Freetime apps would be limited access to storage on the device. Is your app trying to make any read/write calls to anywhere on the device? If so, I'd add some debugging there to see if that's the problem.

2 comments
10 |5000

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

kaloisi avatar image kaloisi commented ·

I'm not sure what you exactly mean by debugging but it never seems to create my Activity. I've have a try catch block around the entire onCreate() method and I never see anything in the logs. The app flickers to a white screen and then immediately exits.

Re the permissions, I do read from storage but shouldn't I be getting exception when I attempt to read? I have tons of debug statements before that would happen and again, none of them are getting to the log.

It's very possible that I've installed the app incorrectly. The only way I could figure out how to test the app inside FreeTime was to:

  1. Upload the Binaries as a live test
  2. Open the Profile
  3. Add the app to the profile

This process is extremely painful.

Is there a better way to install and test it? If I just the regular android studio to install the app, then the app does not show up in the profile.

Is there a way to similar a FreeTime profile using the android emulator?

0 Likes 0 ·
Nick Gardner avatar image Nick Gardner ♦♦ kaloisi commented ·

Based on your current process, that seems correct to me. It does seem very strange that the main Activity never gets created, I can understand that this would be very difficult to debug. I looked through the logs you posted and I agree that there doesn't seem to be anything super useful in there. Sadly there's no real good way to emulate Freetime other than actually running and testing things on the device. For some additional information, can you let me know what specific tablet and OS version you're testing this on? I'll try to reproduce it later, see if I can just create a generic app using that process.

0 Likes 0 ·
kaloisi avatar image
kaloisi answered

I think I figured out my problem although I'm not 100% sure what fixed it and exactly the cause.

I was testing the app via android developers studio using the primary account. So when I uploaded the app to Amazon Live testing and installed it there must have been some conflict between the adb version and the live testing version.

The way I "think" i fixed the problem was to complete remove the app. To do this, I deleted it out of FreeTime then when to the application info page and click the "Remove for All Users" option. Once, I did this I was able to download via FreeTime and it started running.

10 |5000

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

kaloisi avatar image
kaloisi answered

I recently figured out that that running am monitor also includes stack traces that were not getting included in logcat.

adb shell am monitor

10 |5000

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