notepad eclipse java android internal storage

254 views Asked by At

I am trying to do an eclipse java android app using internal storage. It is a notepad. What it should be able to do is write and save notes, search for them an edit them. the most similar application of what I need is this: http://developer.android.com/training/notepad/notepad-ex3.html but I dont know how to modify if to use internal storage and not external, i also found this file that allows you to read and save in internal storage http://www.androidaspect.com/2013/09/android-internal-storage-tutorial.html but now i dont know how change the database for the inernal storage

1

There are 1 answers

0
An SO User On

Okay let's break it down. You want to make something that will let you take notes. Fair enough. You need the kind of storage that will make retrieval and insertion easier.

Let's start with a single text file that you store somewhere (internal or external). If you use this approach, inserting and deleting data becomes difficult because any changes will require you to make changes to the actual text. Not to mention, you will need to format your notes in a way so that you can differentiate one note from another.

Okay, so will using multiple text files solve this? In a way, yes, but you can go for a better approach using SQLite.

SQLiteDatabase has methods to create, delete, execute SQL commands, and perform other common database management tasks.

SQLite seems like the prime candidate for your storage because it makes CRUD (Create, Read, Update, Delete) easier. Instead of trying to modify the code, start from scratch.

Have a look at this tutorial https://www.youtube.com/watch?v=j-IV87qQ00M