Set Image as wallpaper using Intent
<p>I am using the following code to set the wallpaper from an image in a drawable:</p>

<pre><code>Intent setAsIntent = new Intent();
setAsIntent.setDataAndType(uri, "image/*");
setAsIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
setAsIntent.setAction("android.intent.action.ATTACH_DATA");
Intent chooserIntent = Intent.createChooser(
        setAsIntent, "set as");
</code></pre>

<p>But when startActivity, it only shows a message:</p>

<blockquote>
  <p>No apps can perform this action</p>
</blockquote>