Reasonably new to Android programming. I get the feeling that I am missing something. This is the error that I get when I try to run the application. This is my code. I'm not seeing the static reference
private void showFullDatabase() {print(StoredWaypointsDB.getAll());}
And in the other Acitivity;
public String[] getAll() {
ArrayList<String> outputArray = new ArrayList<String>();
String[] result_columns = new String[]{
String.valueOf(KEY_LATITUDE), String.valueOf(KEY_LONGITUDE), KEY_NAME};
String waypointName;
float latitude;
float longitude;
String where = null;
String whereArgs[] = null;
String groupBy = null;
String having = null;
String order = null;
SQLiteDatabase db = moduleDBOpenHelper.getWritableDatabase();
Cursor cursor = db.query(ModuleDBOpenHelper.DATABASE_TABLE,
result_columns, where,
whereArgs, groupBy, having, order);
//
boolean result = cursor.moveToFirst();
while (result) {
waypointName = cursor.getString(cursor.getColumnIndex(KEY_NAME));
latitude= cursor.getFloat(cursor.getColumnIndex(String.valueOf(KEY_LATITUDE)));
longitude = cursor.getFloat(cursor.getColumnIndex(String.valueOf(KEY_LONGITUDE)));
outputArray.add(waypointName + " " + latitude + longitude);
result = cursor.moveToNext();
}
return outputArray.toArray(new String[outputArray.size()]);
}