우리는 모바일 스토리지에 이미지를 다운로드하지 않고, 직접 url
에서 SQLite
데이터베이스에 이미지를 삽입 할 수 있나요?SQLite 데이터베이스?
내 모델 클래스는 데이터베이스에서 get()
이미지이고 이미지는 set()
입니다. 데이터베이스에 이미지 URL을 저장하고 get()
동안 데이터베이스에서 이미지를 검색 하시겠습니까?
public class ImageModel {
int id;
Bitmap image;
public ImageModel()
{
}
public ImageModel(int id_image, Bitmap image)
{
this.id = id_image;
this.image = image;
}
public int getID()
{
return this.id;
}
public int setID(int id)
{
return this.id = id;
}
public Bitmap getImage()
{
return this.image;
}
public Bitmap setImage(Bitmap image)
{
return this.image = image;
}
}
을 당신이 원하는 무엇을? 이미지 URL 또는 이미지를 저장 하시겠습니까? –
URL, URI 또는 경로 만 저장하면됩니다. ** BLOB 저장은 anti-pattern **입니다. –