I want to set a Image View as a wallpaper or contact picture. I need to open a "chooser" for the User and I am using this code :
Uri uri = Uri.parse("android.resource://"+ this.getPackageName()+"/drawable/" +name+"jpg" );
Intent intent = new Intent(Intent.ACTION_ATTACH_DATA);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setDataAndType(uri, "image/jpeg");
intent.putExtra("mimeType", "image/jpeg");
this.startActivity(Intent.createChooser(intent, "Set as:"));
This results in the following message: "no apps can perform this action."