4

Is there any way to tell Android that I want to create new wallpaper engine or restart wallpaper service?

To be more precise I want to integrate LWP with Unity3d. There are some solutions available for it, but they only work for Android versions prior 4.3. If I create surface and attach Unity3d player as Renderer it works fine until I go to preview and then return back to home screen. Then after 20-30 frames LWP crashes with segmentation fault. Although I can go to preview as many times as I like if I don't return to home screen.

So, my idea is... If I can create as many new engines as I like and they work fine, it could be that if I create new engine when I return to home screen I can workaround this crash.

1 Answers1

4

If your LWP is crashing with segmentation fault, you can use the onDestroy() or onStop() method to wait for the crash. Once it occurs, you can relaunch the LWP.

However, you should investigate the reason of the crash using LogCat or Acra. It might be a memory issue.

Harshit Jain
  • 331
  • 1
  • 6