Here you can find the source of getTourNames(SQLiteDatabase db)
public static List<String> getTourNames(SQLiteDatabase db)
//package com.java2s; import java.util.ArrayList; import java.util.List; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; public class Main { protected final static String TOUR_TABLE_NAME = "Tour"; protected final static String TOUR_NAME = "name"; public static List<String> getTourNames(SQLiteDatabase db) { List<String> tourNames = new ArrayList<String>(); Cursor cursor = db.query(true, TOUR_TABLE_NAME, new String[] { TOUR_NAME }, null, null, null, null, null, null);/* w w w. jav a 2 s .c o m*/ cursor.moveToFirst(); while (!cursor.isAfterLast()) { tourNames.add(cursor.getString(0)); } cursor.close(); return tourNames; } }