UPDATE:
For passing the image to the native wallpaper app:
Intent intent = new Intent(Intent.ACTION_SET_WALLPAPER);
startActivity(Intent.createChooser(intent, "Select Wallpaper"));
You can create an item in contextMenu
as Set as wallpaper
in your app and when the user taps that item, you use this code.
Call this method for setting the selected image as Wallpaper:
public void setWallpaper() {
Context context = this.getBaseContext();
Bitmap mBitmap = BitmapFactory.decodeResource(getResources(),mImageIds[pos]);
context.setWallpaper(mBitmap);
}
And add this permission in Android Manifest
file:
<uses-permission android:name="android.permission.SET_WALLPAPER" />