android dictionary application with offline database

I want to develop an android English dictionary application that uses only an offline database. By that, I mean to say that it doesn't have to be redirected to online dictionary like WordWeb or the like. Does anybody know what should I do to store my words? I'm thinking of using SQLite since it's mobile. But if anyone here already has done or did something what I want to do, can you give me some expert suggestions?

91.8k 31 31 gold badges 151 151 silver badges 208 208 bronze badges asked Sep 11, 2012 at 12:36 1,912 11 11 gold badges 42 42 silver badges 72 72 bronze badges

6 Answers 6

I have used this code from developer.android.com . Hope it will help you also.

EDIT: This page is no longer available, but the example itself is on Github here.

6,224 1 1 gold badge 31 31 silver badges 44 44 bronze badges answered Sep 11, 2012 at 12:53 Syamantak Basu Syamantak Basu 935 4 4 gold badges 10 10 silver badges 20 20 bronze badges this sample is not available. Is there any chance that you have a copy of it. appreciate your help Commented Apr 6, 2015 at 3:59 Sorry @Chann Never feared that this could be removed from the repository. Commented Apr 6, 2015 at 4:59 found it in git. thanks for the reply github.com/android/platform_development/tree/master/samples/… Commented Apr 6, 2015 at 5:11 is there a newer version its 4 to 6 years ago update Commented Sep 30, 2015 at 12:13

I'd go with using SQLite, that's probably the easiest and most straightforward way to do it on Android. Of course the complexity of this solution depends on you exact needs. If you only need a really simple dictionary, then you could get away with a simple db schema with basic queries.

Another thing that comes to mind is the Trie data structure, you may want to look into that: http://en.wikipedia.org/wiki/Trie#Dictionary_representation . But it probably wouldn't worth the hassle to pull this off using this, I'd guess that the performance of the SQLite solution is more than enough for your needs.

answered Sep 11, 2012 at 12:46 Zsombor Erdődy-Nagy Zsombor Erdődy-Nagy 16.9k 16 16 gold badges 79 79 silver badges 105 105 bronze badges

I already did this to my dictionaries:

You can make conversion to your simple database, tblLanguage1[word, translation] tblLanguage2[word, translation]

to (SQLite format [extract it from emulator], and then attach this converted SQLite db with your App offline).

It will be quick and fast for searching.

and Use: DB created in emulator with structure like: Tables:

lang1_Content lang1_segments lang1_segdir

use this instead of simple.