自定义Launcher:
在AndroidManifest.xml中 添加 <category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT"/>
<activity
android:name="com.apidemo.MainActivity"
android:excludeFromRecents="true"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
注:android:excludeFromRecents="true" 禁止activity在最近任务栏出现
让应用拥有系统权限:
<在AndroidManifest.xml中 添加系统进程 android:sharedUserId="android.uid.system" >
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.apidemo"
android:sharedUserId="android.uid.system"
android:versionCode="1"
android:versionName="1.0" >
注: 应用 的签名需与系统签名一致