服务回拨到活动的android [英] Service call backs to activity in android

查看:119
本文介绍了服务回拨到活动的android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我有一个回地面服务running.I有哪些与服务交互的客户端。

I have a back ground service running.I have a client which interacts with service.

当对于某些操作的客户端请求,服务执行它和它应该将结果返回到活性(客户端)。

When the client requests for some operation, the service performs it and it should send the result back to the activity(client).

我知道如何调用该服务方法的活动,并使用回调,我们可以achive笏我婉的事情。但我不能够易懂回调API中的演示(remoteservice)提供机制和code的例子。

I know how to invoke the service methods in activity and using call backs we can achive wat I wan to do. But I am not able to understa the call back mechanism and code example provided in Api demos(remoteservice).

任何一个可以给这个服务回拨或任何东西是可以实现用简单的机制更好的教程。

Can any one give better tutorial on this service call back or any thing which is achievable using simpler mechanism.

Thanku提前!

推荐答案

如果有帮助,这里有两个的样本 项目显示远程客户端/服务与回调。

If it helps, here are two sample projects showing a remote client/service with callbacks.

您也可以使用广播意图来发送信息从服务到客户机。

You can also use broadcast Intents to send information from the service to the client.

这篇关于服务回拨到活动的android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆