I am developing a live wallpaper using andengine. Initially i used about 20 texture atlas for each sprite but then in one of the posts in andengine forum I saw that to many texture atlas is not a good thing to have in your app so I changed it to texture packer and now i have 3 texture packers. Everything is ok except when the wallpaper gain focus (either on unlock or closing another app), the wallpaper freezes for about 1-2 sec. Freezing was there even when i had individual texture atlas for each sprite. I added comments in onResume method and the first animation method to see what goes in between the execution of these two lines (first and last line in the following logcat output) and following is the logcat output. Can someone please direct me in right direction. I have already searched a lot on andengine freezing issues but none of them explain's my issue.
12-10 21:23:05.816: E/LiveWallpaperSettings(21831): Resume // <<< onResume Called
12-10 21:23:05.896: D/AndEngine(21831): VERSION: OpenGL ES 2.0
12-10 21:23:05.896: D/AndEngine(21831): RENDERER: Mali-400 MP
12-10 21:23:05.896: D/AndEngine(21831): EGLCONFIG: EGLConfig(Red=5, Green=6, Blue=5, Alpha=0, Depth=0, Stencil=0)
12-10 21:23:05.896: D/AndEngine(21831): EXTENSIONS: GL_OES_texture_npot GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil
12-10 21:23:05.906: D/AndEngine(21831): MAX_VERTEX_ATTRIBS: 16
12-10 21:23:05.906: D/AndEngine(21831): MAX_VERTEX_UNIFORM_VECTORS: 128
12-10 21:23:05.906: D/AndEngine(21831): MAX_FRAGMENT_UNIFORM_VECTORS: 1024
12-10 21:23:05.906: D/AndEngine(21831): MAX_TEXTURE_IMAGE_UNITS: 8
12-10 21:23:05.906: D/AndEngine(21831): MAX_TEXTURE_SIZE: 4096
12-10 21:23:05.906: D/AndEngine(21831): LiveWallpaperTemplate.onSurfaceCreated @(Thread: 'GLThread 11')
12-10 21:23:05.906: D/AndEngine(21831): LiveWallpaperTemplate.onReloadResources @(Thread: 'GLThread 11')
12-10 21:23:05.906: D/AndEngine(21831): LiveWallpaperTemplate.onSurfaceChanged(Width=480, Height=800) @(Thread: 'GLThread 11')
12-10 21:23:06.156: D/dalvikvm(21831): GC_FOR_MALLOC freed 39K, 81% free 2725K/13639K, external 3900K/3900K, paused 12ms
12-10 21:23:06.161: I/dalvikvm-heap(21831): Grow heap (frag case) to 12.774MB for 3932176-byte allocation
12-10 21:23:06.191: D/dalvikvm(21831): GC_FOR_MALLOC freed 0K, 52% free 6565K/13639K, external 3900K/3900K, paused 10ms
12-10 21:23:06.256: D/dalvikvm(21831): GC_CONCURRENT freed 0K, 52% free 6565K/13639K, external 3900K/3900K, paused 1ms+2ms
12-10 21:23:06.301: D/dalvikvm(21831): GC_EXTERNAL_ALLOC freed 3843K, 81% free 2725K/13639K, external 60K/3900K, paused 16ms
12-10 21:23:06.661: D/dalvikvm(21831): GC_FOR_MALLOC freed 4096K, 81% free 2724K/13639K, external 4156K/4156K, paused 9ms
12-10 21:23:06.666: I/dalvikvm-heap(21831): Grow heap (frag case) to 13.274MB for 4194320-byte allocation
12-10 21:23:06.696: D/dalvikvm(21831): GC_FOR_MALLOC freed <1K, 50% free 6820K/13639K, external 4156K/4156K, paused 10ms
12-10 21:23:06.741: D/dalvikvm(21831): GC_CONCURRENT freed <1K, 50% free 6820K/13639K, external 4156K/4156K, paused 1ms+1ms
12-10 21:23:06.911: D/dalvikvm(21831): GC_FOR_MALLOC freed 4096K, 81% free 2724K/13639K, external 4156K/4156K, paused 10ms
12-10 21:23:06.916: I/dalvikvm-heap(21831): Grow heap (frag case) to 13.274MB for 4194320-byte allocation
12-10 21:23:06.946: D/dalvikvm(21831): GC_FOR_MALLOC freed 0K, 50% free 6820K/13639K, external 4156K/4156K, paused 10ms
12-10 21:23:06.996: D/dalvikvm(21831): GC_CONCURRENT freed <1K, 50% free 6820K/13639K, external 4156K/4156K, paused 1ms+2ms
12-10 21:23:07.076: D/dalvikvm(21831): GC_EXPLICIT freed 4100K, 81% free 2724K/13639K, external 60K/572K, paused 16ms
12-10 21:23:07.106: E/LiveWallpaperSettings(21831): Backward loop // animation method called