Android Developer - How to create a searchable list?


Ask by : Craig Woodland November 03, 2012 21:30

I would like to have a database of items stored on the user's phone. I currently have everything set up using WebView pointed at my domain, but obviously this isnt ideal if the user is in a low-signal location.

If possible I would also like to be able to search the list for multiple words.

Any pointers to tutorials etc would be ideal. I'm a beginner at this (know PHP/JavaScript & HTML/CSS very well though!) so please bare with me... Thanks for any help.

View original question

Answer by : AerinxNovember 03, 2012 21:30

In Android you'll want to use SQLite databases, here are some places from where I learned my way with databases in Android:

Start here: http://www.codeproject.com/Articles/119293/Using-SQLite-Database-with-Android

Or here if you want to use an existing database: http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/


If you decide on XML, though, you might want to read this instead:

http://www.anddev.org/parsing_xml_from_the_net_-_using_the_saxparser-t353.html

http://www.androidpeople.com/android-xml-parsing-tutorial-using-saxparser


Here you have a tutorial involving both methods, downloading data in XML format, parsing it and storing the information on a database, probably the guide you want to read if you're starting with Android, since it covers pretty much what you are trying to achieve, probably :P

http://mobile.tutsplus.com/tutorials/android/android-fundamentals-downloading-data-with-services/

View original answer