Android Open Source - AndroidDBManageLibrary D B Sync Service






From Project

Back to project page AndroidDBManageLibrary.

License

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.

Java Source Code

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();
  }

}




Java Source Code List

com.bitsatom.dbmanage.DBSyncService.java
com.bitsatom.dbmanage.MainActivity.java
com.bitsatom.dbmanage.android.DBHelper.java
com.bitsatom.dbmanage.android.DBManageException.java
com.bitsatom.dbmanage.parser.DBAssetParser.java
com.bitsatom.dbmanage.parser.SQLParser.java
com.example.dbmanage.data.VersionMetaStructure.java