1

I am working on developing an android application. The application has a feature to take photo. That photo should be saved in SQLite database. Later, the cable is used as a communication between android device and Linux computer to transfer those photos from android device to computer. Could you please suggest me what kind of data type should be used to save image?

Kazi
  • 33
  • 1
  • 8

1 Answers1

1

In my opinion you should save the image as base64 encoded string to the database and then decode it.

As example I can show you the entry of the PHP manual for base64 encoding here: PHP MANUAL

I hope this helps :-)

sHentschel
  • 155
  • 6
  • And one thing I forgot to mention is that my Tablet and my workstation both will be out of internet connection all the time. Does it still work that way also? – Kazi Nov 14 '13 at 10:29
  • doge's article seems to explain the base64 encode feature very well. The datatype from a base64 encode will be a string so in SQLite you would have to use a TEXT field. – sHentschel Nov 14 '13 at 10:54
  • Thanks sHentschel. Your opinion seems to be useful :) – Kazi Nov 14 '13 at 12:17