Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
import java.io.File; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase.CursorFactory; import android.database.sqlite.SQLiteException; import android.util.Log; public abstract class KittDBHelper { private static final String TAG = "KittDBHelper"; private final Context mContext; private final CursorFactory mCursorFactory; private final String DB_NAME; private final int DB_VERSION; private SQLiteDatabase mDB = null; private boolean DB_EXTERNAL = false; private String DB_PATH = ""; public KittDBHelper(Context context, String name, CursorFactory factory, int version, boolean isExternal) { if(version < 1){ throw new IllegalArgumentException("Version must be >= 1, version is: " + version + "."); } mContext = context; mCursorFactory = factory; DB_NAME = name; DB_VERSION = version; DB_EXTERNAL = isExternal; } //Return database with read only permission public synchronized SQLiteDatabase getReadableDatabase() { if(mDB != null && mDB.isOpen()){ Log.d(TAG, "Database: " + DB_NAME + " is already open."); return mDB; } else if (DB_NAME == null){ throw new SQLiteException("Cannot open a temporary database as READ ONLY."); } initializeDB(); mDB.close(); mDB = SQLiteDatabase.openDatabase(DB_PATH, mCursorFactory, SQLiteDatabase.OPEN_READONLY); Log.d(TAG, "Database: " + DB_NAME + " opened (READ ONLY)."); return mDB; } //Return database with write permission public synchronized SQLiteDatabase getWritableDatabase() { if(mDB != null && mDB.isOpen() && !mDB.isReadOnly()){ Log.d(TAG, "Database: " + DB_NAME + " is already open."); return mDB; } initializeDB(); Log.d(TAG, "Database: " + DB_NAME + " opened (READ/WRITE)."); return mDB; } //Perform necessary actions to create or update and/or open database private void initializeDB() { if(DB_NAME == null){ mDB = SQLiteDatabase.create(null); } else{ if(!DB_EXTERNAL){ mDB = mContext.openOrCreateDatabase(DB_NAME, 0, mCursorFactory); DB_PATH = mContext.getDatabasePath(DB_NAME).getPath(); } else{ File f = new File(mContext.getExternalFilesDir(null), DB_NAME); mDB = SQLiteDatabase.openOrCreateDatabase(f, mCursorFactory); DB_PATH = f.getPath(); } } int curVersion = mDB.getVersion(); if(curVersion != DB_VERSION){ mDB.beginTransaction(); try{ if(curVersion == 0){ onCreate(mDB); } else{ if(curVersion < DB_VERSION){ onUpgrade(mDB, curVersion, DB_VERSION); } else{ onDowngrade(mDB, curVersion, DB_VERSION); } } mDB.setVersion(DB_VERSION); mDB.setTransactionSuccessful(); } finally{ mDB.endTransaction(); } } onOpen(mDB); Log.d(TAG, "Database: " + DB_NAME + " initialized."); } public void onOpen(SQLiteDatabase db) { // Optional: override function to perform additional functions on open. } public synchronized void close() { if(mDB != null && mDB.isOpen()){ mDB.close(); mDB = null; Log.d(TAG, "Database: " + DB_NAME + " closed."); } } public abstract void onCreate(SQLiteDatabase db); public abstract void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion); public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { throw new SQLiteException("Unable to downgrade database: " + DB_NAME + " from version " + mDB.getVersion() + " to version " + DB_VERSION + ". Override " + "onDowngrade method to provide this functionality."); } }