首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

lanucher shortcut表构造

2012-06-27 
lanucher shortcut表结构桌面快捷方式是保存在手机的 /data/data/com.android.launcher/databases/launche

lanucher shortcut表结构

桌面快捷方式是保存在手机的 /data/data/com.android.launcher/databases/launcher.db 这个数据库文件下的favorites表中.

几个主要字段:

_id,

title,(快捷方式的名称)

intent,(快捷方式启动的对象)

screen,(快捷方式在哪个屏幕,默认是1)

cellX,cellY,(快捷方式的位置)

iconPackage,iconResource(快捷方式的图标)

?

另外低版本的SDK是用"content://com.android.launcher.settings/favorites?notify=true"来访问.

?

sqlite> select * from favorites;1|Calendar|#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=com.android.calendar/.LaunchActivity;end|-100|2|3|1|1|1|0|-1||0|||?PNG||2|Display settings|#Intent;action=android.intent.action.MAIN;category=com.android.settings.SHORTCUT;launchFlags=0x200000;component=com.android.settings/.DisplaySettings;end|-100|2|1|1|1|1|1|-1||0|com.android.settings|com.android.settings:drawable/ic_launcher_settings|?PNGsqlite> .schemaCREATE TABLE android_metadata (locale TEXT);CREATE TABLE favorites (_id INTEGER PRIMARY KEY,title TEXT,intent TEXT,container INTEGER,screen INTEGER,cellX INTEGER,cellY INTEGER,spanX INTEGER,spanY INTEGER,itemType INTEGER,appWidgetId INTEGER NOT NULL DEFAULT -1,isShortcut INTEGER,iconType INTEGER,iconPackage TEXT,iconResource TEXT,icon BLOB,uri TEXT,displayMode INTEGER);
?

热点排行