0

Storing a image in sqlite is not a proper way to do. Can I store the location of the image eg.(asset/facea.png) and so on... So when I fetch the data from sqlite DB I get the location(asset/facea.png). From here please guide me how to convert the link (asset/facea.png) location to image when I submit it. My edittext contains value like "hi asset/facea.png" how can I change that to hi <image> on click submit.

MY sample code: http://pastebin.com/xzPBKK2L

Thanks in advance.

Triad sou.
  • 2,969
  • 3
  • 23
  • 27
  • possible duplicate of [how to store Image as blob in Sqlite & how to retrive it?](http://stackoverflow.com/questions/7331310/how-to-store-image-as-blob-in-sqlite-how-to-retrive-it) – KV Prajapati Sep 20 '11 at 05:40

1 Answers1

0

it an bad idea to put image in asset folder (put in drawable), morever if you put image in apk(resource) then there might be chance of application size become large(may be in MBs). so i just advice you to put image on server and just download from that and view with the concept of LAZYLIST(cache) and can refer also this

Community
  • 1
  • 1
Mohammed Azharuddin Shaikh
  • 41,633
  • 14
  • 96
  • 115
  • Sir thanks for your reply. i am doing a chat application. i ve 30 smileys. we select smiley from the gridview and display that in textbox. as of now i get the location or specialcharcter from sqlite DB. what i need is when i submit my message it goes to webservice and returns me back messge i typed. as of now i get message with specialcharcter. but i need message with smilye image. Please guide me in this issue. – user950203 Sep 20 '11 at 05:48
  • ok then, just put your smiley in drawble folder and access from there. Advicing you because you are not having a large number of image – Mohammed Azharuddin Shaikh Sep 20 '11 at 05:56
  • In this how can i replace "asset/facea.png" with image in asset folder. PLease guide me.. Thanks in advance.. Raghav – user950203 Sep 20 '11 at 06:25
  • put your image directly in Drawable folder, and just use from it Google it – Mohammed Azharuddin Shaikh Sep 20 '11 at 06:30