开发者

disable live wallpaper

My question is simple. Is there a way to disable or remove the Live Wallpaper that is bundled in my application until I am ready for the user to be able to choose it?

The user needs to configure 开发者_JS百科settings first in the main app, and then the Live Wallpaper can be used, but until then, I'd like for it not to appear in the list of Live Wallpapers.


Take a look at something like this. I'm not sure if it would work for live wallpapers (which are services) but it'd be worth a try.


Is there a way to disable or remove the Live Wallpaper that is bundled in my application until I am ready for the user to be able to choose it?

AFAIK, no.


if you want to remove all the wallpaper and take default one it useful,

            WallpaperManager myWallpaperManager
            = WallpaperManager.getInstance(getApplicationContext());
            try {
                myWallpaperManager.clear();

            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

you can also set wallpaper image by same way,

            try {
                myWallpaperManager.setResource(R.drawable.ic_launcher);

            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜