I'm new in android programming. I want something to know:
I want users to click on a button to launch wallpaper chooser.
What should I do?
WallpaperManager is probably what you're looking for: http://developer.android.com/reference/android/app/WallpaperManager.html
Implement the following code in you button onClickListener()
button
onClickListener()
WallpaperManager myWallpaperManager = WallpaperManager.getInstance(context); try { myWallpaperManager.setResource(R.id.imageName); } catch (IOException e) { e.printStackTrace(); }
This will change the wallpaper to imageName.
imageName
Copyright © 2021 Jogjafile Inc.
WallpaperManager is probably what you're looking for: http://developer.android.com/reference/android/app/WallpaperManager.html