android set wallpaper as app background
<p>I want that when a user clicks a button in an app, they get a dialog box that allows them to select a wallpaper from albums, a set of live wall papers, system wall papers or even images. I'd like the functionality to be exactly like it is with the home page wallpaper except that I need this selected image to be the background of my <code>Main Activity</code>. So, When they select it and click set as wallpaper, this image should be used as app's background drawable.</p>

<p>I have this for a start:</p>

<pre><code>   Intent intent = new Intent(
               WallpaperManager.ACTION_LIVE_WALLPAPER_CHOOSER);
       intent.putExtra(WallpaperManager.COMMAND_TAP,
               new ComponentName(MainActivity.class),
                       Wallpaper.class));
startActivity(intent);
</code></pre>

<p>My second idea is to use set background bitmap using <code>WallpaperManager.getInstance(this).setBitmap(bitmap);</code>
I don't know which direction to move..</p>
