WallpaperManager wallpaperManager = WallpaperManager.getInstance(getApplicationContext());
try {
Bitmap bitmap = ((android.graphics.drawable.BitmapDrawable) imageview1.getDrawable()).getBitmap();
wallpaperManager.setBitmap(bitmap);
}
catch (Exception g) {
g.printStackTrace();
}
WallpaperManager wallpaperManager = WallpaperManager.getInstance(getApplicationContext());
try {
Bitmap bitmap = ((android.graphics.drawable.BitmapDrawable) imageview1.getDrawable()).getBitmap();
wallpaperManager.setBitmap(bitmap);
}
catch (Exception g) {
g.printStackTrace();
}
//Lock screen:
WallpaperManager wallpaperManager = WallpaperManager.getInstance(getApplicationContext());
try {
Bitmap bitmap = ((android.graphics.drawable.BitmapDrawable) imageview1.getDrawable()).getBitmap();
wallpaperManager.setBitmap(bitmap,null,true,wallpaperManager.FLAG_LOCK);
}
catch (Exception g) {
g.printStackTrace();
}
//Home and lock screen:
WallpaperManager wallpaperManager = WallpaperManager.getInstance(getApplicationContext());
try {
Bitmap bitmap = ((android.graphics.drawable.BitmapDrawable) imageview1.getDrawable()).getBitmap();
//For both screens:
wallpaperManager.setBitmap(bitmap,null,true,wallpaperManager.FLAG_LOCK);
wallpaperManager.setBitmap(bitmap);
}
catch (Exception g) {
g.printStackTrace();
}
//Remember to add xml permission, if you are using original sketchware, then use apk pro editor and go to "
AndroidManifest.xml" and paste the following permission:
<uses-permission android:name="android.permission.SET_WALLPAPER" />
Delivery term: Not specified