How to set up Live Wallpaper automatically every day in Android

I am developing a wallpaper application. We can add simple wallpapers automatically using the following code with the service.

final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this); final Drawable wallpaperDrawable = wallpaperManager.getDrawable(); final ImageView imageView = (ImageView) findViewById(R.id.imageview); imageView.setDrawingCacheEnabled(true); imageView.setImageDrawable(wallpaperDrawable); 

Now I need to automatically install Live Wallpaper using the service, since Live Wallpaper should be automatically installed every day on the screen. How can we do this???

thanks

+7
source share
3 answers

You can start a collection of wallpapers with pre-selected live wallpapers, but there is currently no way to set them without user intervention.

See this for the intent, to shoot, to do this, and also see the documentation for Extra that you need to provide in order to pre-select live wallpapers. http://developer.android.com/reference/android/app/WallpaperManager.html#ACTION_CHANGE_LIVE_WALLPAPER

+2
source

It is not possible to install Live Wallpaper programmatically without any user interaction. Even on the root device you cannot install Live Wallpaper, you cannot surpass the LiveWallpaperSerivce system class.

+1
source

Of course you can do it.

1) Put all GIF files in the source directory

2) Create some Movie objects in the Engine class

3) Draw your movie on canvas

  void nyanNyan(Canvas canvas) { canvas.save(); canvas.scale(mScaleX, mScaleY); wallpaper_movies.get(Settings.currentWeather).setTime(mWhen); wallpaper_movies.get(Settings.currentWeather).draw(canvas, 0, 0); canvas.restore(); } 

You must upload your GIF provided

0
source

All Articles