0

I am quite new to android and java, and I would like to have a bit of help from you to figure things out.

I have been working on a live wallpaper app lately, here is what I achieved and my blocking points:

I use the WallpaperService to create my custom LWP, I change its colors and shapes based on the user preference (preference fragment screen) with preferenceChangeListener.

My main activity just handles the preference fragments and UI. Is is my main menu where I can set the WP and change the preferences.

Here is my problem: I would like to show the live wallpaper preview as background of my main activity. I haven't figured out a way to do this so far.

The only solution I found is to show the wallpaper through the activity by changing my Theme to a transparent one.

But this requires to set the wallpaper first. Once the WP is set, my app works exactly the way I want. But before that, my main activity can't show the WP preview because the service isn't running yet.

I don't think that there's a way to extract the WP preview from the WP service. I need to change something.

Also, I don't want to show only a sample img of the WP, I really want to run my code and show the results to the user as a preview.

Could you tell me how to change my code in order to get the correct behavior? I might have to use another class that I could run in parallel or something. It is a bit obscure to me...

Thank you very much!

Ugo
  • 1
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Dec 22 '22 at 18:15

0 Answers0