How to set Live Wallpaper automatically everyday in android
Asked Answered
B

3

7

I am developing a wallpaper app. We can add simple wallpaper automatically by using the following code with a 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 have to set Live Wallpaper automatically using a service, means Live Wallpaper should set automatically everyday on Screen. how can we do this???

Thanks

Butt answered 3/4, 2012 at 14:11 Comment(6)
No, but if you found any solution, plz let me know. thanksButt
Same there, if you find something please notify me.Boatel
@Boatel could you provide solution here .so that it helps some one in future.Erik
@srithatsmyname It's impossible to set Live Wallpaper programmatically without any user interaction. Even on rooted device you can't set the Live Wallpaper, you can't surpass the LiveWallpaperSerivce system class.Boatel
@Boatel nice answer, put it in properly and be rewarded :)Diary
@Diary there it is, on the bottom of this question my friend :)Boatel
D
2

You can launch the wallpaper chooser with your live wallpaper pre-selected, but there doesn't currently appear to be a way to set it without user intervention.

See this for the Intent to fire to do this as well as see the documentation for the Extra you need to supply to preselect your live wallpaper. http://developer.android.com/reference/android/app/WallpaperManager.html#ACTION_CHANGE_LIVE_WALLPAPER

Decane answered 12/4, 2013 at 17:27 Comment(0)
B
1

It's impossible to set Live Wallpaper programmatically without any user interaction. Even on rooted device you can't set the Live Wallpaper, you can't surpass the LiveWallpaperSerivce system class.

Boatel answered 15/4, 2013 at 11:14 Comment(0)
J
0

Ofcourse you can do it.

1) Put your all GIF files in raw directory

2) Create multiple Movie objects in 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 have to load your GIF on condition

Juratory answered 5/11, 2014 at 12:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.