I am trying to make wallpaper app but I am facing a problem which is the low resolution after setting the wallpaper.
Although the real picture before setting as wallpaper is very high resolution from url.
This is my code:
public void set(View view) {
Toast.makeText(MainActivity.this, "Setting wallpaper", Toast.LENGTH_LONG).show();
Intent intent = new Intent(Intent.ACTION_ATTACH_DATA);
intent.setDataAndType(getImageUri(this,bitmaptwo), "image/*");
intent.putExtra("Bitmap", "image/*");
startActivity(intent);
}
public Uri getImageUri(Context inContext, Bitmap inImage) {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
inImage.compress(Bitmap.CompressFormat.JPEG, 0, bytes);
String path = MediaStore.Images.Media.insertImage(inContext.getContentResolver(), inImage, "Title", null);
return Uri.parse(path);
}