老师讲的将startService与bindService两者混合使用好像有问题。
protected void onDestroy() {
super.onDestroy();
stopService(intent2);
unbindService(conn);
}通过调用Activity中的onDestroy()方法stop、unbind服务,当按下back键关闭activity时,也同时调用了服务的onDestroy()方法,服务不可能再在后台运行了(在模拟器的settings——Apps的RUNNING标签下同样也未找到该程序的service)。这样无法实现service与activity的分离呀。