android的捷徑比較簡單,就是發一個系統的廣播,然後為捷徑設定Intent---package com.xikang.android.slimcoach.utils;/** * @author huiych * 建立捷徑 * @created 2013-02-21 * */import android.content.Intent;import android.os.Parcelable;import com.xikang.android.slimcoach.AppXiKang;import com.xikang.android.slimcoach.R;import com.xikang.android.slimcoach.ui.AppStart;public class ShortCutUtil { public static void initShortCut(){ Intent addShortCut = new Intent("com.android.launcher.action.INSTALL_SHORTCUT"); //不能重複建立捷徑 addShortCut.putExtra("duplicate", false); String title = AppXiKang.getApp().getString(R.string.app_name);//名稱 Parcelable icon = Intent.ShortcutIconResource.fromContext(AppXiKang.getApp(), R.drawable.icon);//表徵圖 //點擊捷徑後操作Intent,捷徑建立後,再次啟動該程式 Intent intent = new Intent(AppXiKang.getApp(), AppStart.class); //設定捷徑的標題 addShortCut.putExtra(Intent.EXTRA_SHORTCUT_NAME, title); //設定捷徑的表徵圖 addShortCut.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, icon); //設定捷徑對應的Intent addShortCut.putExtra(Intent.EXTRA_SHORTCUT_INTENT, intent); //發送廣播添加捷徑 AppXiKang.getApp().sendBroadcast(addShortCut); }}AppXiKange.getApp(),是擷取Activity對象。注意,要在資訊清單檔中設定許可權 <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>這樣在希望增加捷徑的時候,就可以給使用者一個alertdialog,提示,然後引用。就可以了。市場上也有很多應用是在應用安裝的時候直接建立捷徑。不過這樣的實現不是很友好。不建議使用。