Calculator with a save function...

Put your problem here if it does not fit any of the other categories.

Calculator with a save function...

Postby chrisLU5 » Fri Mar 02, 2012 3:25 pm

Hello, complete noob here :mrgreen: i am a university student in the UK and have to do a end of year independant project. My project is a simple job estimation app, i know roughly how i am going to do this. I would really like to add a feature to save the estimations to display at a later date, how would i go about this??

Regards Chris
chrisLU5
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Mar 02, 2012 3:01 pm

Top

Re: Calculator with a save function...

Postby Phyll » Sat Mar 03, 2012 12:18 am

Hi Chris,

The simplest way would be to write them to a text file. I don't know what your information looks like but that is the most trivial way to do it. Give it a file name and store it in the private files of your program. If its a lot of data you might want to store it on the sdcard. But in a text file.

The next more complicated way is to store it in an SQLite data base. This is more work but if the records are small you keep them all in the same table and just add them and retrieve them.

Preferences is another way to store data for extended periods but not really made for accumulating data. I don't know (again) how you intend for this to work but this method may be ill suited for storage of many estimation jobs.

Those are pretty much your three choices for persistant storage.

Hope this helps.

Phyll
Phyll
Master Developer
Master Developer
 
Posts: 648
Joined: Fri Oct 14, 2011 11:19 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 13 guests