Curtain
Curtain

Reputation: 1972

Live Wallpaper startup problem

I have created Live Wallpaper app. When I start this via Wallpapers -> Live Wallpapers -> Settings and then Set wallpaper it works, but if I reboot the phone the drawing is just black color.

What's the way to optimize it? I want it to be as if I set it in the Walllpaper settings, but when the phone is booting up.

Any ideas? Just comment if there's any specific code you want to see.

Thanks!

Upvotes: 2

Views: 1932

Answers (3)

Style-7
Style-7

Reputation: 1209

I found the same problem on the device Meizu 15 Lite (Android 7.1.2 API 25). I thought something wrong with my code and spend 3 hours and found the solution. Open device settings - apps - app permissions - find your app in the list - Background progresses - and set to "Allow running in background".

Upvotes: 0

Wroclai
Wroclai

Reputation: 26925

If you're using an image from external memory (e.g. SD card) you should consider copying the image to your application's internal memory.

Upvotes: 3

Rohit Mandiwal
Rohit Mandiwal

Reputation: 10462

I think you should mark your application so that it will autostart as the devise OS boots up!! Doing this will automatically starts your app after the booting process finished.

To do this, you need to register with the Boot Broadcast receivers. Here is a reference link, just have a look http://www.androidenea.com/2009/09/starting-android-service-after-boot.html

Upvotes: 0

Related Questions