I am working on an Android application. How can I get Phone wallpaper in Android? Please help me. Give me the sample code example.
You need to use WallpaperManager
which, among other things mentioned in the documentation, allows you to get the current wallpaper.
The following snippet will get the current wallpaper (or the system default if no wallpaper is set).
final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
final Drawable wallpaperDrawable = wallpaperManager.getDrawable();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With