Android Open Source - CallLog Database Open Helper






From Project

Back to project page CallLog.

License

The source code is released under:

GNU General Public License

If you think the Android project CallLog 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.kaosh.calllog;
/*  www.  j a v a2  s.  com*/
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DatabaseOpenHelper extends SQLiteOpenHelper {

  private static final String DATABASE_NAME = "calllog.db";
  private static final int DATABASE_VERSION = 1;

  public static final String NP_TABLE_NAME = "nps";
  public static final String HOTLINE_TABLE_NAME = "hotliness";
  
  private static final String NP_TABLE_CREATE = 
        "CREATE TABLE " + NP_TABLE_NAME + " (" +
        "number TEXT, " +
        "vendorId INT" +
        ");";

  private static final String HOTLINE_TABLE_CREATE = 
        "CREATE TABLE " + HOTLINE_TABLE_NAME + " (" +
        "number TEXT, " +
        "rate FLOAT" +
        ");";
  
  DatabaseOpenHelper(Context context) {
    super(context, DATABASE_NAME, null, DATABASE_VERSION);
  }
  
  @Override
  public void onCreate(SQLiteDatabase db) {
    db.execSQL(NP_TABLE_CREATE);
    db.execSQL(HOTLINE_TABLE_CREATE);
  }

  @Override
  public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    
  }

}




Java Source Code List

com.kaosh.calllog.CallLogActivity.java
com.kaosh.calllog.CallLogWidget.java
com.kaosh.calllog.DatabaseOpenHelper.java
com.kaosh.calllog.HotlineAdapter.java
com.kaosh.calllog.HotlineObj.java
com.kaosh.calllog.HotlineSettingActivity.java
com.kaosh.calllog.Hotline.java
com.kaosh.calllog.NPAdapter.java
com.kaosh.calllog.NPObj.java
com.kaosh.calllog.NPSettingActivity.java
com.kaosh.calllog.NP.java
com.kaosh.calllog.PhoneLog.java
com.kaosh.calllog.PhoneUtils.java
com.kaosh.calllog.RateSettingActivity.java
com.kaosh.calllog.SMSLog.java
com.kaosh.calllog.Utils.java