I want to get an image
from database and show that in gallery
or other apps that can show an image
. How can set a uri
for that image
??
I get a image from database like this :
public Bitmap retrive(String table,String noeDastor,int row){
Cursor cur=mydb.rawQuery("SELECT * FROM "+table+" where noeDastor= '"+noeDastor+"'", null);
cur.moveToPosition(row);
photo=cur.getBlob(5);
ByteArrayInputStream imageStream = new ByteArrayInputStream(photo);
Bitmap theImage= BitmapFactory.decodeStream(imageStream);
return theImage;
}
And I want show the Image
in gallery
of phone...