简体   繁体   中英

android how to get current wallpaper name?

how to get the current wallpaper name i have search for it but nothing found . i just found current wallpape r but how to get current wallpaper name. here is the code where i get current wallpaper . help me with some code how can get its name.thanks in advance.

 final WallpaperManager wallpaperManager = WallpaperManager.getInstance(getApplicationContext());
                    final Drawable wal = wallpaperManager.getDrawable();
                    WallpaperInfo wallpaperInfo =  wallpaperManager.getWallpaperInfo();

Try to use below code for that if it helps you,

  PackageManager pm = getPackageManager();
  WallpaperInfo wallpaperInfo =  wallpaperManager.getWallpaperInfo();
  String wpName = wallpaperInfo.loadLabel(pm);

Hope this will help you

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM