Android examples for Database:Cursor Get
get Cursor String Value
//package com.java2s; import android.database.Cursor; public class Main { public static String getCursorStringValue(String ColumnName, Cursor cursor) {//from ww w. j a v a 2 s .c om int col = cursor.getColumnIndex(ColumnName); if (col != -1 && !cursor.isNull(col)) { return cursor.getString(col); } else { return null; } } }