0

I follow this Instruction and it works.

Problem:

  • Every time I exit my application I need to capture again another image but the image that was been capture is save in the android gallery

Question:

  • How can I save the image in database so when I open my application the image will be their.
Blackbelt
  • 156,034
  • 29
  • 297
  • 305
ziah299
  • 17
  • 2
  • 7
  • If you have a bitmap (or a way of converting the image to a bitmap)... http://stackoverflow.com/questions/6341776/how-to-save-bitmap-in-database – zgc7009 Nov 11 '14 at 15:24

2 Answers2

0

Unlike some comments suggest, image format doesn't matter. You can either save it as BLOB (byte[]) or text (converting it to Base64).

Anyway it's not a good idea to store images in a DB, prefer a file, as argued over here.

Community
  • 1
  • 1
m0skit0
  • 25,268
  • 11
  • 79
  • 127
0

i will advice you get the path at which the image is located at in the android device and load up on your application start. the case of saving it in a database is not cool. that is like consuming the user's memory space on the database side and also the device storage which is not cool.