-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDvxWifiScanDbHelper.java
27 lines (23 loc) · 1.01 KB
/
DvxWifiScanDbHelper.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package eu.iledelareunion.www.dvxwifiscan;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class DvxWifiScanDbHelper extends SQLiteOpenHelper {
// If you change the database schema, you must increment the database version.
public static final int DATABASE_VERSION = 1;
public static final String DATABASE_NAME = "DvxWifiScan.db";
public DvxWifiScanDbHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
private static final String sqlCreate = "create table accesspoint (ssid text, bssid text, level text, freq text, caps text)";
public void onCreate(SQLiteDatabase db) {
db.execSQL(sqlCreate);
}
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL(sqlCreate);
onCreate(db);
}
public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
onUpgrade(db, oldVersion, newVersion);
}
}