I want to set home wallpaper with white bitmap:
Bitmap bitmap = Bitmap.createBitmap(WIDTH, HEIGHT, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
canvas.drawColor(0xfff);
WallpaperManager wall = WallpaperManager.getInstance(this);
try {
wall.setBitmap(bitmap);
} catch (IOException e) {
e.printStackTrace();
}
And the wallpaper becomes black. What's wrong is here?
Just add bitmap.eraseColor(Color.WHITE);
as second line