Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/194.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何使用系统默认操作设置墙纸_Android_Crop_Wallpaper - Fatal编程技术网

Android 如何使用系统默认操作设置墙纸

Android 如何使用系统默认操作设置墙纸,android,crop,wallpaper,Android,Crop,Wallpaper,我必须通过调用默认系统操作将SD卡中的图像设置为墙纸 在Menifest.xml中添加以下权限 <uses-permission android:name="android.permission.SET_WALLPAPER" /> @karthik是直接设置的。@CapDroid我想使用系统默认操作裁剪图像并设置壁纸。。 <uses-permission android:name="android.permission.SET_WALLPAPER" /> Intent

我必须通过调用默认系统操作将SD卡中的图像设置为墙纸

Menifest.xml中添加以下权限

<uses-permission android:name="android.permission.SET_WALLPAPER" />

@karthik是直接设置的。@CapDroid我想使用系统默认操作裁剪图像并设置壁纸。。
<uses-permission android:name="android.permission.SET_WALLPAPER" />
Intent intent = new Intent("com.android.camera.action.CROP", myIntent.getData());
if (myIntent.getStringExtra("mimeType") != null) {
   intent.setDataAndType(myIntent.getData(), myIntent.getStringExtra("mimeType"));
}
intent.putExtra("crop", "true");
intent.putExtra("aspectX", 1);
intent.putExtra("aspectY", 1);
intent.putExtra("outputX", 96);
intent.putExtra("outputY", 96);
intent.putExtra("return-data", true);
startActivityForResult(intent, REQUEST_CROP_PHOTO);