I am making a wallpaper application, i have one issue: when i try to click my button "Set background", it sets the background but it is zoomed in and because of that i lost half of my original image. This is the code that i am using:
try {
Display d = ((WindowManager)getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
int width = d.getWidth();
int height = d.getHeight();
WallpaperManager wallpaperManager = WallpaperManager.getInstance(view.getContext());
Bitmap bitmap = null;
bitmap = Bitmap.createScaledBitmap(bmpWallpaper, width, height, false);
wallpaperManager.setBitmap(bitmap);
Core.makeNotification(view.getContext(), "MyNotification", "Your wallpaper has been set, enjoy!");
Core.makeAlert(view.getContext(), "Wallpaper set", "Your wallpaper has been set, enjoy!");
} catch (IOException e) {
e.printStackTrace();
}