[英]Starting an apk on boot in Android
Is there a way to start an Android application on boot?有没有办法在启动时启动 Android 应用程序? Perhaps by adding something to the init.rc script?
也许通过在 init.rc 脚本中添加一些东西?
If by "Android application", you mean something with a user interface, make it the home screen.如果“Android 应用程序”是指带有用户界面的东西,请将其设为主屏幕。
If by "Android application", you mean you have a small hunk of code you want to run around the time of boot, set up a BroadcastListener
for the BOOT_COMPLETED
broadcast.如果通过“Android 应用程序”,您的意思是您有一小块代码要在启动时运行,请为
BOOT_COMPLETED
广播设置一个BroadcastListener
。
You would only manipulate init.rc
if you are doing things like creating custom firmware.如果您正在做诸如创建自定义固件之类的事情,您只会操纵
init.rc
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.