没有用户界面后台应用程序 [英] Background application without ui
问题描述
我是新android开发。我想打一个后台应用程序,所以它一直在后台运行,这是没有任何UI,甚至其图标不会出现在桌面上。
总之这是一个隐形的应用程序。
这可能吗?
I am new to android development. I want to make one background application, so that it keeps running in background, and it's without any UI, and even its icon do not appear on desktop.
In short it's a stealth application.
Is it possible?
推荐答案
这当然是可能的。要创建一个应用程序,不具有发射台的图标,只是删除活动
与 android.intent.category.LAUNCHER
从类别的AndroidManifest.xml
。
This is certainly possible. To create an app that does not have an icon in the launch pad, just remove the Activity
with the android.intent.category.LAUNCHER
category from the AndroidManifest.xml
.
要实现你的后台应用程序的这很大程度上取决于你想要做什么。您可以创建一个 服务
长正在运行的任务,<一个href="http://developer.android.com/reference/android/content/BroadcastReceiver.html"><$c$c>BroadcastReceiver$c$c>s反应以特定事件或<一href="http://developer.android.com/guide/topics/fundamentals.html#actlife"><$c$c>Activities$c$c>意图过滤器。
To implement your background application it strongly depends on what you want to do. You can create a Service
for long running tasks, BroadcastReceiver
s to react to specific events or Activities
with intent filters.
请注意,但是,您的应用程序将在这两个文件系统并根据管理应用程序设置可见。
Be aware, however, that your application will be visible in both the file system and in the settings under 'Manage Applications'.
这篇关于没有用户界面后台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!