开发者

How to get Bitmap image from OI file manager path?

My application requires an image to be selected from 开发者_如何学JAVAgallery.

I start activity:

Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent,"Select Picture"), PICK_IMAGE);

It will prompt to select from gallery or OI file manager

For the OI file manager, I get the path from Uri as follow:

Uri selectedImageUri = data.getData();
filemanagerstring = selectedImageUri.getPath();

Now how do I get Bitmap image from the filemanagerstring?


You can use this:

BitmapFactory.decodeFile(String pathName);

Look at here

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜