Risike Posted July 18, 2010 Share Posted July 18, 2010 J'essai de changer le wallpaper de ces deux façons et aucune ne marche... WallpaperManager wall = WallpaperManager.getInstance(context); Drawable drawable = context.getResources().getDrawable(R.drawable.test); Bitmap bmp = Bitmap.createBitmap(480, 480, Bitmap.Config.ARGB_4444); Canvas canvas = new Canvas(bmp); drawable.setBounds(0, 0, 480, 480); drawable.draw(canvas); try { //wall.setBitmap(bmp); context.setWallpaper(); } catch (IOException e) { } Et simplement : wall.setResource(R.drawable.test); je précise que R.drawable.test est un fichier png de 480x480. Où est-ce que je m**** svp ? Link to comment Share on other sites More sharing options...
Risike Posted July 19, 2010 Author Share Posted July 19, 2010 Problème réglé, il me manquait une permission SET_WALLPAPER. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.