Reputation: 23
Is it possible to load an image from its path saved in the database. The image is actually saved in the sd card (the default gallery).
This is the path of the image saved in the database
/mnt/sdcard/download/68107_174917912527848_100000289204785_530969_2619951_n-1.jpg
I want to load this image on an image view when an activity starts.
Upvotes: 0
Views: 2105
Reputation: 41106
Its like reading any other file from sdcard, you can use BitmapFactory to convert File into bitmap and use it in imageview,
Check this,
Show Image View from file path?
Upvotes: 1
Reputation: 109257
Fetch Image path from database using select query,
then ,
Bitmap bitmap = BitmapFactory.decodeFile(<pathOfImage>);
ImageView img = new ImageView(this);
img.setImageBitmap(bitmap);
Upvotes: 1