Basically have been trying to set the wallpaper through a location based app.
WallpaperManager wManager;
Bitmap bitmap;
try {
bitmap = BitmapFactory.decodeFile(wallSrc);
wManager = WallpaperManager.getInstance(getApplicationContext());
wManager.setBitmap(bitmap);
}
catch (Exception e) {
e.printStackTrace();
}
Profiling the code points out that the line
wManager.setBitmap(bitmap);
is acting as the culprit here. This seems to be taking an irrationally high amount of time to execute. Any faster mechanism to do the same? or to rephrase the question- Knowing the path to an image, what would be the fastest way to set it as a wallpaper?