Back to project page AndroidDBManageLibrary.
The source code is released under:
Apache License
If you think the Android project AndroidDBManageLibrary 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.bitsatom.dbmanage; /*ww w . jav a2 s .c o m*/ import android.app.IntentService; import android.content.Intent; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import com.bitsatom.dbmanage.android.DBHelper; public class DBSyncService extends IntentService { public enum SyncServiceParam{ DB_NAME("DB_NAME"), DB_VERSION("DB_VERSION"); private String param; private SyncServiceParam(String param){ this.param = param; } @Override public String toString(){ return param; } } public DBSyncService() { super("DB Sync Service"); } @Override protected void onHandleIntent(Intent intent) { Bundle bundle = intent.getExtras(); String dbName = (String)bundle.get(SyncServiceParam.DB_NAME.toString()); Integer version = (Integer)bundle.get(SyncServiceParam.DB_VERSION.toString()); DBHelper dbHelper = new DBHelper(this.getBaseContext(), dbName, null, version); SQLiteDatabase db = dbHelper.getReadableDatabase(); } }