Android I/O: Locale file or SQLite database

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

Android I/O: Locale file or SQLite database

Postby sunjavaduke » Wed Apr 22, 2009 7:37 am

Hi everybody,

I am new to Android.
I noticed that there are many ways to implement the data storage function.
Here is my situation:
I want to implement a paint application, the user can draw picture or write words on the screen, and I want to detect the bounds of the drawing, and save the drawing, and display the drawing again when the user wants to review the drawing.
I got the following questions:
1. Should I use locale file to save the drawing or use a SQLite database? I know it involves IO operation, both are high-weight operations that consume memory.
2. Anyone can provide a little sample on how to implement the draw-->save--->re-display process?

Thanks a lot.
User avatar
sunjavaduke
Freshman
Freshman
 
Posts: 5
Joined: Tue Apr 21, 2009 11:09 am
Location: Shanghai, China

Top

Postby Sparkletron » Mon May 18, 2009 3:30 am

Use the local file system to store the binary, and use the DB to store a reference to the file as well as other file metadata.

-S
Sparkletron
Developer
Developer
 
Posts: 26
Joined: Tue Nov 04, 2008 6:17 am

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 5 guests