哈哈哈..这个答案有点晚了。 ;-)但是,我认为它没有被正确回答,所以这里就是...我收集的是你想要启动壁纸选择器。有两种方法可以做到这一点,取决于哪个Android版本,你会看到下面。您只能在版本16之后指定您的壁纸。否则,启动选择器并且用户指定壁纸。
if (android.os.Build.VERSION.SDK_INT >= 16)
{
Intent intent = new Intent("android.service.wallpaper.CHANGE_LIVE_WALLPAPER");
intent.putExtra("android.service.wallpaper.extra.LIVE_WALLPAPER_COMPONENT", new ComponentName(getApplicationContext().getPackageName(), (new StringBuilder(String.valueOf(getApplicationContext().getPackageName()))).append(".LiveWallpaper").toString()));
try
{
startActivity(intent);
finish();
return;
}
catch (ActivityNotFoundException activitynotfoundexception)
{
activitynotfoundexception.printStackTrace();
}
return;
}
Intent intent1 = new Intent();
intent1.setAction("android.service.wallpaper.LIVE_WALLPAPER_CHOOSER");
try
{
startActivity(intent1);
}
catch (ActivityNotFoundException activitynotfoundexception1)
{
activitynotfoundexception1.printStackTrace();
Toast.makeText(getApplicationContext(), "Live Wallpapers not supported", 1).show();
}
finish();
不是真的......在android中有一个预览动态壁纸的默认Activity。我想利用该Activity/Intent在设备上使用通用Live Wallpaper预览活动。我假设你需要通过意图(不管它叫什么)一些关于你想要预览的动态壁纸的额外信息。 – CatalystNZ 2011-04-05 21:45:39
更多类似这样:http://stackoverflow.com/questions/2749791/creating-own-livewallpaperpreview? – 2011-04-06 05:30:56