The way to reload live wallpapers

Is there a way to tell Android that I want to create a new wallpaper browser or restart the wallpaper service?

To be more precise, I want to integrate LWP with Unity3d. There are some solutions for it, but they only work for Android versions up to 4.3. If I create a surface and attach the Unity3d player as a Renderer, it works fine until I go to the preview and then go back to the main screen. Then, after 20-30 frames, the LWP drops with a segmentation error. Although I can go to view as many times as I like if I do not return to the main screen.

So, my idea ... If I can create as many new engines as I like and they work fine, maybe if I create a new engine when I return to the main screen, I can get around this error.

+4
source share
1 answer

If your LWP crashes with a segmentation error, you can use the onDestroy () or onStop () method to wait for the failure. Once this happens, you can restart LWP.

However, you must investigate the cause of the failure using LogCat or Acra. This may be a memory issue.

+4
source

All Articles