Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望创建一个特权应用程序(预安装或在根设备中)。我可以让我的应用程序在用户没有打开它的情况下运行服务吗?如何?
普通应用程序安装在“停止状态”。这意味着他们所有的广播接收器都被禁用,直到用户手动打开它们。
系统应用程序没有这个限制,因此您可以将您的应用程序放在系统分区中,在 BOOT_COMPLETED 上使用广播接收器并在无需用户交互的情况下启动您的服务。