I'm within the planning stage of creating a database application for android phones. Among my needs is the fact that I have the ability in a position to provide offline access for customers. I'm wondering what will be the most effective method of storing a lot of images (around 400-several 1000).
Oh, the pictures happen to be pre-compressed/enhanced for mobile viewing. The 50mb limit on apk for that market will not be considered a problem.
You need to develop simple logic.Suppose you've connection then download all images.Now you must two means to access these images while you don't have connection-----
Store all images in data base as blob(But it not feasible to store huge amount of data to database)
Store all images in sdcard(by making a folder in it) and now store link of these images in data base Table.Suppose you donot have connection then first fetch image path from DB Table then fetch file from sdcard and display
you need to store 1000 of images, inside your application, and should also provide offline working, so only accessible solutions for this is either place it in
res/drawable directory or perhaps in
/asset directory. I believe saving images in database like a blob type its something similar to odd work.
However the primary problem is size images, if dimensions are more in MBs. Then it's worst. No-one can wish to download this type of application and install in it device. (This really is my own opinion I might wrong also about this). However the better strategy is if at all possible reduces amount and size images. As well as if at all possible please provide online function, put individuals images on web server ans store link to individuals images in database. This really is easiest way for you personally.
Please improve this, If anyone includes a better solutions or way.