Android Open Source - 5th Data Base






From Project

Back to project page 5th.

License

The source code is released under:

GNU General Public License

If you think the Android project 5th 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.zhanglin.practice;
//from  w  ww.  jav  a2 s .c  o  m
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.os.Build.VERSION;
import android.util.Log;

public class DataBase extends SQLiteOpenHelper
{
  private String TAG="test";
  private static final int VERSION=1;
  public DataBase(Context context,String name,CursorFactory factory,int version)
  {
    super(context,name,factory,version);
    // TODO Auto-generated constructor stub
    Log.i(TAG,"DataBase is going");
  }
  public DataBase(Context context,String name)
  {
    this(context,name,VERSION);
  }
  public DataBase(Context context,String name,int version)
  {
    this(context,name,null,VERSION);
  }
  @Override
  public void onCreate(SQLiteDatabase db)
  {
    // TODO Auto-generated method stub
    Log.i(TAG,"onCreat is going");
    db.execSQL("create table music(path char(100),title char(100),artist char(100),album char(100),duration long)");
  }

  @Override
  public void onOpen(SQLiteDatabase db)
  {
    // TODO Auto-generated method stub
    Log.i(TAG,"onOpen is going");
    super.onOpen(db);
  }

  @Override
  public void onUpgrade(SQLiteDatabase arg0,int arg1,int arg2)
  {
    // TODO Auto-generated method stub
    Log.i(TAG,"onUpgrade is going");
  }

}




Java Source Code List

.AlbumActivity.java
.MainActivity.java
.PlayListActivity.java
.alb.java
.art.java
com.zhanglin.practice.About.java
com.zhanglin.practice.ArtistActivity.java
com.zhanglin.practice.ChangeGestureDetector.java
com.zhanglin.practice.DataBase.java
com.zhanglin.practice.MusicListAdapter.java
com.zhanglin.practice.PlayerServices.java
com.zhanglin.practice.PlayingActivity.java
com.zhanglin.practice.PublicList.java
com.zhanglin.practice.SetModeActivity.java
com.zhanglin.practice.SongsActivity.java
.formatTime.java