I don't know why it freezes every time the wallpaper is not shown (getting back from sleep mode or exiting an application etc...), sometimes it works normally and sometimes it freezes. I'm working with the nightly version. In Logcat i see "engine resumed" but no render.

How can i solve this?

有帮助吗?

解决方案

You're probably losing track of some explicitly managed resource during the pause. For example any OpenGL object references are invalid after a suspend. Libgdx developers often run into problems when they store objects in static members and think they only need to be initialized once, but the object is (or contains objects that eventually point to) an OpenGL resource (so it needs to be re-initialized on each 'resume' at least).

See http://bitiotic.com/blog/2013/05/23/libgdx-and-android-application-lifecycle/ for a description of the life cycle impacts (its written for standard Android apps, not wallpapers, but most of the concepts still apply).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top