开发者

Android - In Preferences get an image uri from stock Gallery

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜