开发者

android how to get phones photo gallery? [duplicate]

开发者 https://www.devze.com 2023-01-13 21:55 出处:网络
This question already has an answer here: 开发者_运维百科 how to get the images from device in android java application
This question already has an answer here: 开发者_运维百科 how to get the images from device in android java application (1 answer) Closed 3 months ago.

I would like to show the phone's photo gallery and when the user selects an image then notify my application on the image selected so I can get that images informations.

is that possible and how?


u can get the absolute path of your image stored in the Gallery of your phone by

Environment.getExternalStorageDirectory();

here there are different options available. You can use DIRECTORY_PICTURES where all the images are stored in the SD Card.

now u can use this to get your directory file.

u can try this out it works for me

0

精彩评论

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