Populating AutoCompleteTextView with SQLite data

Reading time ~1 minute

I'm currently working on a hobby project with working title EnschedeLocator, which is an Android app where users can type in an address and using their unit's GPS receiver, get an arrow that points them to the destination. A simple offline navigation tool. The addresses comes from Opendata Enschede, and are stored with coordinates in a database shipped with the app.

For my EnschedeLocator app I want the user to be able to start typing the name of the street he wants and then receive suggestions as he types. The idea is that he has to find a match in order to continue or else the street wont be in the database.

After spending too much time trying to populate an AutoCompleteTextView using a Cursor directly (might be a dead end), the simple solution came from GiantFlyingSaucer. Simply create a method in your SQLiteOpenHelper class that turns you query into a String-array and then use that to populate the ArrayAdapter as shown on Android Developers.

CloudMerger - Java based application for merging (kinect) point clouds [Final project]

For my last three weeks at the Faculty of Geo-Information Science and Earth Observation (ITC) at the University of Twente in May 2012, I&...… Continue reading