I try to create wallpaper and use for that AndEngineLiveWallpaper. So, I sometimes catch IndexOutOfBoundsException, when try to detach child sprite from scene. I now, that I must use runOnUpdateThread, but it useful only on BaseGameActivity.

How can I fix that in BaseLiveWallpaperService?

有帮助吗?

解决方案

Call your Engine runOnUpdateThread method:

mEngine.runOnUpdateThread(new DetachChildRunnable())
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top