摘要:
转载请注明地址http://blog.csdn.net/xiaanming/article/details/9750689 在Android中,Activity主要负责前台页面的展示,Service主要负责需要长期运行的任务,所以在我们实际开发中,就会常常遇到Activity与Service之间的通信,我们一般在Activity中启动后台Service,通过Intent来启动,Intent中我们可以传递数据给Service,而当我们Service执行某些操作之后想要更新UI线程,我们应该怎么做呢?接下来我就介绍两种方式来实现Service与Activity之间的通信问题通过Binder对象当A 阅读全文
posted @ 2013-08-09 22:58
Android_AnJon
阅读(332)
评论(0)
推荐(0)
摘要:
在android的开发中,尤其是与访问网络有关的开发,都要判断一下手机是否连接上了网络,下面是一个判断是否连接网络的编码package cn.com.karl.util; import com.kubu.main.R; import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Conne.. 阅读全文
posted @ 2013-08-09 22:55
Android_AnJon
阅读(163)
评论(0)
推荐(0)

浙公网安备 33010602011771号