1.在工程中添加一个BootBroadcastReceiver.java文件,此文件作用可看里面的注释说明;
2.在AndroidManifest.xml中添加如下代码:
......
<receiver
android:name=".BootBroadcastReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
......
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"></uses-permission>
......
3.然后编译程序,生成APK包;
4.将此APK包放在android/out/target/product/astar-y3/system/app/里,不需删除Launcher2.apk;
5.编译安桌源码得到镜像文件,烧写;启动后程序可自动运行;
2.在AndroidManifest.xml中添加如下代码:
......
<receiver
android:name=".BootBroadcastReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
......
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"></uses-permission>
......
3.然后编译程序,生成APK包;
4.将此APK包放在android/out/target/product/astar-y3/system/app/里,不需删除Launcher2.apk;
5.编译安桌源码得到镜像文件,烧写;启动后程序可自动运行;