What's the difference between using WallpaperManager.getInstance(context)
and (WallpaperManager) context.getSystemService(Context.WALLPAPER_SERVICE)
?
If I open source code for getInstance()
method, it returns (WallpaperManager) context.getSystemService(Context.WALLPAPER_SERVICE)
, so obviously there is no difference. But according to this answer, using getInstance()
solved OP's problem. Also, docs suggest using getSystemService()
.
Which approach is better and why?