开发者

running android application in background [closed]

开发者 https://www.devze.com 2023-01-29 15:47 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
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

精彩评论

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