开发者

running android application in background [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago. 开发者_开发问答

in my application when I click on exit button the application has to run in background or my hme screen must be visible how do i do this i am new to android i have no idea about it


What you are looking for is an android service. Please read this introduction, and paticulary the part about the different kinds of application component.


In order to have your application run in the background, you need to create a service. You can read a short tutorial here. Be advised that there are battery concerns for having an application run all the time, so only do it if you absolutely need to.


You can use Service to handle the core logic of your app, and put a notification icon on the status bar. When the user check out the notification, you can display your UI and get logic data from your Service.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜