开发者

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开发者_如何学Python specific code you want to see.

Thanks!


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.


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


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".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜