i am writing a code for live wallpaper, well live wallpaper is done, but i have problem with it. I open Live wallpaper selector and i take my Live wallpaper, and i set it, but when i set it preview mode is destroyed and another instance of livewallpaper is loaded and set as live wallpaper. Problem: I want that preview mode and real Live wallpaper has 1 very same instance, when i go back to preview mode the current live instance from Live wallpaper is opened not new. I hope i explained well.
Asked
Active
Viewed 682 times
1 Answers
0
I'm solving similar problem. I could not avoid making multiple instances of Engine class in WallpaperService class. So I moved my memory intensive stuff to separate class and shared it between Engine instances via static variable.
You should be aware of race conditions and other funky thread-related stuff, so get synchronized.