Android wallpapers with a choice of service

I am developing an application in which there are a lot of wallpapers. I want to create a dialog that will appear when the user clicks on the image and ask the user which service will use to set the wallpaper. (home screen, home and lock screen, whatsup, etc.)

I found the solution myself, here is my 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); 
+4
source share

Source: https://habr.com/ru/post/1481950/


All Articles