如何通過contentprovider構建媒體文件數據庫(doc 7頁)
如何通過contentprovider構建媒體文件數據庫(doc 7頁)內容簡介
如何通過contentprovider構建媒體文件數據庫內容提要:
以Camera的image文件文件為例,數據庫在第一次使用的時候被創建,對於image文件,SQL在updateDatabase為其創建一個table:
db.execSQL("CREATE TABLE IF NOT EXISTS images (" +
"_id INTEGER PRIMARY KEY," + //文件保存的序號
"_data TEXT," + //記錄image 文件保存路徑
"_size INTEGER," + //文件大小
"_display_name TEXT," + //圖片名稱
"mime_type TEXT," + //文件類型
"title TEXT," +
"date_added INTEGER," +
"date_modified INTEGER," +
"description TEXT," +
"picasa_id TEXT," +
"isprivate INTEGER," +
"latitude DOUBLE," +
"longitude DOUBLE," +
"datetaken INTEGER," +
"orientation INTEGER," +
"mini_thumb_magic INTEGER," +
"bucket_id TEXT," +
"bucket_display_name TEXT" +
");");
..............................
以Camera的image文件文件為例,數據庫在第一次使用的時候被創建,對於image文件,SQL在updateDatabase為其創建一個table:
db.execSQL("CREATE TABLE IF NOT EXISTS images (" +
"_id INTEGER PRIMARY KEY," + //文件保存的序號
"_data TEXT," + //記錄image 文件保存路徑
"_size INTEGER," + //文件大小
"_display_name TEXT," + //圖片名稱
"mime_type TEXT," + //文件類型
"title TEXT," +
"date_added INTEGER," +
"date_modified INTEGER," +
"description TEXT," +
"picasa_id TEXT," +
"isprivate INTEGER," +
"latitude DOUBLE," +
"longitude DOUBLE," +
"datetaken INTEGER," +
"orientation INTEGER," +
"mini_thumb_magic INTEGER," +
"bucket_id TEXT," +
"bucket_display_name TEXT" +
");");
..............................
用戶登陸
數據倉熱門資料
數據倉相關下載