去往动态壁纸的预览页面,那可以设…

来源:互联网 发布:linux rand 编辑:程序博客网 时间:2024/05/18 03:59

    publicstatic void startLiveWallpaperPrevivew(Activity activity, StringpackageName, String classFullName) {
       ComponentName componentName = new ComponentName(packageName,classFullName);
       Intent intent;
       if (android.os.Build.VERSION.SDK_INT < 16) {
           intent = newIntent(WallpaperManager.ACTION_LIVE_WALLPAPER_CHOOSER);
       } else {
           intent = newIntent("android.service.wallpaper.CHANGE_LIVE_WALLPAPER");
           intent.putExtra("android.service.wallpaper.extra.LIVE_WALLPAPER_COMPONENT",componentName);
       }
       activity.startActivityForResult(intent,Configs.REQUEST_SET_LIVE_WALLPAPER);
    }
0 0