WallpaperManager.setBitmap() not setting wallpaper inmediately
I set the wallpaper using this code:
void SetWallPaper(Context MyContext, Bitmap MyBitmap)
{ WallpaperManager wpm = WallpaperManager.getInstance(MyContext);
wpm.setBitmap(MyBitmap);
}
It works well and the bitmap is set as a wallpaper always. BUT my problem
is that many times the phone screen still shows last wallpaper until you
refresh the screen. The ways of refreshing the screen can be: 1. Changing
from one desktop to another using your finger. This makes the wallpaper to
refresh. 2. Opening any application that creates an activity covering the
whole home screen. When exiting it the home screen is refreshed and the
last set bitmap is shown.
It sounds crazy, but the result is that the wallpaper has been changed but
it is not displayed until the phone has to redraw it or something like
that. So, is there any way to force the phone to redraw or refresh it?
Thanks
No comments:
Post a Comment