Android Open Source - sensor-supervisor D B Helper






From Project

Back to project page sensor-supervisor.

License

The source code is released under:

GNU General Public License

If you think the Android project sensor-supervisor 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

package com.thirdi.sensorsupervisor;
/*from  ww w .  ja  va  2s.  c  o m*/
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DBHelper 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 = "SensorData.db";

  public DBHelper(Context context) {
    super(context, DATABASE_NAME, null, DATABASE_VERSION);
  }

  public void onCreate(SQLiteDatabase database) {
    database.execSQL(DBContract.SQL_CREATE_ENTRIES);
  }

  public void onUpgrade(SQLiteDatabase database, int oldVersion, int newVersion) {
    //Discard data and start over when upgraded. (Needs to be changed.)
    database.execSQL(DBContract.SQL_DELETE_ENTRIES);
    onCreate(database);
  }

  public void onDowngrade(SQLiteDatabase database, int oldVersion, int newVersion) {
    onUpgrade(database, oldVersion, newVersion);
  }
}




Java Source Code List

com.thirdi.sensorsupervisor.AudioFragment.java
com.thirdi.sensorsupervisor.CameraFragment.java
com.thirdi.sensorsupervisor.CameraPreview.java
com.thirdi.sensorsupervisor.DBContract.java
com.thirdi.sensorsupervisor.DBHelper.java
com.thirdi.sensorsupervisor.DatabaseFragment.java
com.thirdi.sensorsupervisor.FileHelper.java
com.thirdi.sensorsupervisor.GPSFragment.java
com.thirdi.sensorsupervisor.MainActivity.java
com.thirdi.sensorsupervisor.MediaFragment.java
com.thirdi.sensorsupervisor.NavigationDrawerFragment.java
com.thirdi.sensorsupervisor.NetworkFragment.java
com.thirdi.sensorsupervisor.SensorFragment.java
com.thirdi.sensorsupervisor.SettingsFragment.java
com.thirdi.sensorsupervisor.WifiAdapter.java
com.thirdi.sensorsupervisor.maps.java