Set as Wallpaper intent dialog?

1656 views android
2

I am trying to create my own wallpaper app and I can't figure out how to start this intent?

enter image description here

What is this intent? How do I pass image to device default wallpaper app?

answered question

1 Answer

5

Try following code snippet:

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:"));

posted this

Have an answer?

JD

Please login first before posting an answer.