Back to project page Android-Apps.
The source code is released under:
Apache License
If you think the Android project Android-Apps listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.kniezrec.xbmcgear.preferences; /*from w w w .jav a 2s.co m*/ import android.database.sqlite.SQLiteDatabase; class HostTable { // Database table public static final String TABLE_ACT = "xbmc_hosts"; public static final String COLUMN_ID = "_id"; public final static String COL_INSTANCE_NAME = "instance_name"; public final static String COL_HOST_IP = "hostIP"; public final static String COL_HTTP_PORT = "httpApiPort"; public final static String COL_USER_NAME = "userName"; public final static String COL_PASSWORD = "password"; public final static String COL_MAC = "macaddress"; // Database creation SQL statement private static final String DATABASE_CREATE = "create table " + TABLE_ACT + "(" + COLUMN_ID + " integer primary key autoincrement, " + COL_INSTANCE_NAME + " text not null, " + COL_HOST_IP + " text not null," + COL_HTTP_PORT + " integer not null," + COL_USER_NAME + " text null," + COL_PASSWORD + " text null," + COL_MAC + " text null" + ");"; public static void onCreate(SQLiteDatabase database) { database.execSQL(DATABASE_CREATE); } public static void onUpgrade(SQLiteDatabase database) { database.execSQL("ALTER TABLE " + TABLE_ACT + " ADD COLUMN " + COL_MAC + " text null"); } }