Android Setting Wallpaper with service chooser -


i developing application have lot of wallpapers in it. want build dialog appears when user clicks on images , , ask user service use setting wallpaper. (home screen, home , lock screen , whatsup , etc.)

i have found solution myself , here code ;

file f = new file(path);  //                   uri picuri = uri.fromfile(f);                   intent setas = new intent(intent.action_attach_data);                 setas.setdataandtype(picuri, "image/*");                 //setas.putextra(intent.extra_stream,picuri);                 startactivityforresult(intent.createchooser(setas, "set as"), 0); 


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -