I am creating application in j2me. There is a huge data with whom I have to deal.
I have used RMS but speed of retrieving a data from RMS is tedious process. It takes long time then normal speed.
I can't use File because it requires permission every time whenever I fetch data or store data.
so is there any other options for storing large data in j2me.
Thank you....
Some third party database available for j2me application. See this link for list of database.
Store the data into text files and store the text files into your project workspace. You can read the data from this text files.
Finally you can store the data into server and fetch the data from server using webservice. But needs GPRS.
I preferred last point for using huge data.
1.
Some third party database available for j2me application. See this link for list of database.
2.
Store the data into text files and store the text files into your project workspace. You can read the data from this text files.
3.
Finally you can store the data into server and fetch the data from server using webservice. But needs GPRS.
I preferred last point for using huge data.
harsh
Related
I want to store the images and display the same on the screen using struts. Is it better to store the images in database or on the file system? I have more than 10,000 images.
Storing images in the database as objects like blob or clob is generally not recommended as this will make the database size huge. You may get poor results while processing your resultsets. The better way to do this is have the images get stored in your file system and simply use its references in the databases which is efficient. Using a hash check on the uploaded images will also help in verifying the integrity of the images if they are uploaded to the server from the clients.
File system. It turns out it's quite good at storing files.
I'm building an app which takes some data from a Web XML file (similar to RSS feed) and shows those data in a Webview.
This is done through a DOMParser activity which i feed with different XML URLs.
Now, i would like to take some of these data and store them in the internal storage (a kind of "Favorite" option), to let the user to see them offline.
To see these stored data, i would like to use the same DOMParser, feeding an internal path instead of a web URL (so i don't need to create another activity).
To go in this way, i need to create an empty XML file somewhere (res/XML/file.xml), store the necessary data inside this file (whenever the user choose to do it) and let the user to retrieve the data from this XML (instead of the one on the web URL) when offline thorugh the DOMParser.
Which is the better way to store data to keep what above?
Is SQLite able to store and delete data in a XML file or do i need to use other tools?
Thanks to anyone who wants to help me
You can't store this files inside res/xml folder, it's not allowed. You can store it in filesystem. Android official tutorial explains storing files in great details.
When you store files or read them you have to work with Streams.
Update in response to first comment
It depends how big and complex is that part of XML data. If you wish to retrieve that part XML in whole then I would go with filesystem.
SQLite would be a good choice if you like to have SQL structure in respect to your XML part, then you could benefit e.g. creating query to find XML bits you are interested in. I don't see a point to use SQLite and store XML part as a String per row.
If you still don't know which to chose, have a look at example implementations and see which one is more comfortable for you.
I am trying to save some documents/Images and files in sqlite database. The documents contain different types of pdf,.doc etc files and different format images. Now once I stored it in the blob format, I want to do a backup of the database to sdCard. I however want this backup to be readable only by app for securing the data inside.
Now the question is , for storing different types of files, Do I have to use some sort of other database and for securing. what should I do?
Best Regards
Android's built-in SQLite does not support encryption.
Try instead a library like SQLCipher.
One solution is to use blob and to store the raw data of the file as a column in the db as you are currently doing.
Other solution which I think is better to store the files on the Internal Storage and just store the file paths in the database. Internal storage is private for your application so no one will have access to the files, so your security concerns are taken care of.
see here for how to do this:
Creating folder in internal Memory to save files and retrieve them later
But be aware that can using too much internal storage can make people's phones run out of internal storage and they might decide to delete your app.
I am in the planning stage of making a database application for android phones. One of my requirements is that I be able able to provide offline access for users. I am wondering what would be the most efficient way of storing a large amount of images (around four hundred-several thousand).
Oh, the images have been pre-compressed/optimized for mobile viewing. The 50mb limit on apk for the market won't be a issue.
You have to develop simple logic.Suppose you have connection then download all images.Now you have two way to access these images while you do not have connection-----
Store all images in data base as blob(But it not feasible to store huge amount
of data to database)
Second..
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
I would suggest storing the image files in sdcard and filename/path in sqlite DB. Store files in /Android/data/your.package.name/cache/ directory. When the user deletes the application, the cache folder will be deleted and also all the stored images.
Application build file(apk) size will be less as tofeeqahmad was suggesting.
I want to be able to store, retrieve, and modify a small amount of textual data (< 2 mb) as a CSV online. What service should I use to be able to do this programatically (in Java)?
Try Google Spreadsheets (Java API Reference). You can upload a CSV which gets automatically converted to a spreadsheet, then you can query or edit it programmatically, or manipulate it online, then if you need to get it as CSV you can export it.
You can try Google's App Engine. http://code.google.com/appengine/docs/whatisgoogleappengine.html
Also there is Amazon S3. http://aws.amazon.com/s3/
I know a few Open Source people using these tools to store online persistent data to useful effect.
OpenDHT sounds like it will do what you need it to.
http://www.opendht.org/