Get current displayed image from ImageSwitcher

view full story

http://stackoverflow.com – Hello I build an application with an imageswitcher and a button. When I press the button I need to set as wallpaper the current image displayed in the imageswitcher. How can I get the full image path from the current displayed image? (like R.drawable.myimage) I found getDisplayedChild() but is not doing what I need. Here is my code: WallpaperManager myWallpaperManager = WallpaperManager.getInstance(getApplicationContext()); try { int imageid = iSwitcher.getDisplayedChild(); myWallpaperManager.setResource(imageid); alerta( (HowTos)