android 系统开机运行指定程序

来源:互联网 发布:nginx日志格式配置 编辑:程序博客网 时间:2024/06/06 01:02

让应用程序开机即可启动,可以参考Launcher的配置文件设置


1、在activity都android:name 下加入

        android:launchMode ="singleTask"

       android:clearTaskOnLaunch = "true"

      android:stateNotNeeded = "true"

    android:theme = "@style/Theme"

    android:screenOrientation= "nosensor"

  android:windowSOftINputMode="stateUnspecified|adjustPan"



2、把intene-filter 改为如下形式:

   <intene-filter>

<action android:name ="android.intent.action.MAIN">

<category android:name = "android.intent.cetegory.HOME">

<category android:name = "android.intent.cetegory.DEFAULT">

</INTENT-FILTER>


3、把编译好的程序安装到系统中,并删除原有都Luancher2