为什么本人用 unbindService 方法解除了绑定后,仍然可以在 活动中调用 服务中的方法,解除绑定后,服务确实已经调用了 onDestory方法销毁了服务,为什么还能调用服务中的方法呢?
活动的代码:
package com.example.myservicetest;
import com.example.myservicetest.MyService.*;
import android.app.*;
import android.content.*;
import android.view.*;
import android.view.View.*;
import android.os.*;
import android.util.Log;
import android.widget.*;
public class MainActivity extends Activity implements OnClickListener {
//--
private Button b1, b2, b3, b4, b5;
private ServiceConnection connection;
private MyService myService;
private Intent in;
//--
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//获取按