If you think the Android project caddisfly-app-camera listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
/*
* Copyright (C) TernUp Research Labs//www.java2s.com
*
* This file is part of Caddisfly
*
* Caddisfly is free software: you can redistribute it and modify it under the terms of
* the GNU Affero General Public License (AGPL) as published by the Free Software Foundation,
* either version 3 of the License or any later version.
*
* Caddisfly is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Affero General Public License included below for more details.
*
* The full license text can also be seen at <http://www.gnu.org/licenses/agpl.html>.
*/package com.ternup.caddisfly.database;
import com.ternup.caddisfly.app.Globals;
import android.database.sqlite.SQLiteDatabase;
publicclass LocationTable {
// Database table
publicstaticfinal String TABLE_LOCATION = "location";
publicstaticfinal String COLUMN_ID = "_id";
publicstaticfinal String COLUMN_DATE = "date";
publicstaticfinal String COLUMN_LONGITUDE = "longitude";
publicstaticfinal String COLUMN_LATITUDE = "latitude";
publicstaticfinal String COLUMN_ACCURACY = Globals.QUALITY_KEY;
publicstaticfinal String COLUMN_NAME = "name";
publicstaticfinal String COLUMN_STREET = "street";
publicstaticfinal String COLUMN_TOWN = "town";
publicstaticfinal String COLUMN_CITY = "city";
publicstaticfinal String COLUMN_STATE = "state";
publicstaticfinal String COLUMN_COUNTRY = "country";
publicstaticfinal String COLUMN_SOURCE = "source";
publicstaticfinal String COLUMN_NOTES = "notes";
publicstaticfinal String COLUMN_SENT = "sent";
// Database creation SQL statement
privatestaticfinal String DATABASE_CREATE = "create table "
+ TABLE_LOCATION
+ "("
+ COLUMN_ID + " integer primary key autoincrement, "
+ COLUMN_DATE + " long not null, "
+ COLUMN_NAME + " text, "
+ COLUMN_LONGITUDE + " double, "
+ COLUMN_LATITUDE + " double, "
+ COLUMN_ACCURACY + " double, "
+ COLUMN_STREET + " text, "
+ COLUMN_TOWN + " town, "
+ COLUMN_CITY + " text, "
+ COLUMN_STATE + " text, "
+ COLUMN_COUNTRY + " text, "
+ COLUMN_NOTES + " text, "
+ COLUMN_SOURCE + " int, "
+ COLUMN_SENT + " flag boolean"
+ ");";
publicstaticvoid onCreate(SQLiteDatabase database) {
database.execSQL(DATABASE_CREATE);
}
publicstaticvoid onUpgrade(SQLiteDatabase database) {
database.execSQL("DROP TABLE IF EXISTS " + TABLE_LOCATION);
onCreate(database);
}
}