Change wallpaper Programmatically Sketchware



Code used :

WallpaperManager myWallpaperManager = WallpaperManager.getInstance(getApplicationContext()); try { Bitmap bitmap = ((android.graphics.drawable.BitmapDrawable) imageview1.getDrawable()).getBitmap(); myWallpaperManager.setBitmap(bitmap); } catch (Exception g) { g.printStackTrace(); }




Add this to your manifest.xml

<uses-permission android:name="android.permission.SET_WALLPAPER"/>


Video tutorial :

Comments

Popular posts from this blog

Read Json file from asset in Sketchware Pro

Web Scraping With Jsoup in Sketchware