用于替代从Android服务将数据推送到一个活动 [英] Alternatives for Pushing data from an Android Service to an Activity

查看:144
本文介绍了用于替代从Android服务将数据推送到一个活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经被从网络接收的UDP数据的服务。我想的的从服务到UI活动这一数据。

I've a service that is receiving UDP data from the network. I want to push this data from the service to a UI activity.

做到这一点的方法之一是使用的广播意图的。什么是的性能开销的从服务经常发送广播的活动?

One way to do it is using broadcast Intents. What is the performance overhead of sending broadcasts frequently from the service to the activities?

是否有这样做的任何其他的选择吗?

Are there any other alternatives for doing this ?

感谢。

推荐答案

不知道广播意图的开销,但类似这样的一个话题是的 前几天讨论。

Not sure of the overhead of Broadcasting Intents but a topic similar to this was discussed a few days ago.

这篇关于用于替代从Android服务将数据推送到一个活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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