I need to retrieve images Uri from stock Gallery and save it to sharedPreferences, in order to let the user choose a custom wallpaper for a live wallpaper.
From preferences I can call an Intent programmatically this way:
intentPref.setIntent(new Intent().setAction(Intent.ACTION_PICK)
.setData(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI)开发者_高级运维);
or I can load it from XML, but I don't know how to get the result from the Intent (as in startActivityForResult), so I can save the Uri to SharedPreferences.
Any ideas?
精彩评论