下面我们看Activity这一面:
package cn.cbd.service;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
public class ServiceTestActivity extends Activity
{
private Button btn_bindService;
private TextView tv_show;
private MyServiceConnection conn;
private MyService.MyBinder myBinder;
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
btn_bindService = (Button) findViewB