如何为我的应用程序创建服务?
我正在构建一个 SIP 应用程序,它现在运行良好,我希望它在退出时继续作为服务工作以始终接收来电(要完全退出该应用程序,用户必须通过点击“退出”中的“退出”来确认它)菜单选项)。我该怎么做? 非常感谢您的帮助。
I'm building a SIP application, it works well now, and i want it to stay working as service when quit it to always receive incoming calls(to quit completely the app, the user has to confirm it by tapping "Exit" in the menu option). How can i do it ?
Thank you very much for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
那么您可以从阅读文档开始: http://developer.android.com/ Reference/android/app/Service.html
其中包含用于编写服务的各种示例代码。查看 ApiDemos 了解更多示例代码。
Well you could start by reading the documentation: http://developer.android.com/reference/android/app/Service.html
That has various sample code for writing services. Look at ApiDemos for more sample code.