AndroidManifest.xml 应用主入口配置:
<activity
android:name="com.*.cust.contacts.MainActivity"
android:exported="true"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<!-- 自定义的action,通过自定义的action可以应用内调用 -->
<action android:name="*.intent.action.SHORTCUT" />
<category android:name="android.intent.category.LAUNCHER" />
<!-- 必须加上这个,否则无法直接使用自定的action -->
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
创建快捷方式: