/**
* Binds this activity to a service using the service connection specified. Note that it is the responsibility of the calling party (AndroidMessageServer) to update this activities member variable, mService, when the connection to the service is complete. AndroidMessageServer can't do the bind by itself because it needs to be done by an Android activity. Also, we do it here because the AndroidMessageServer doesn't know when we are destroyed. Here we know and can unbind the service. The reason we don't simply move all of the binding here is that AndroidMessageServer needs to create it's own Messenger for the service connection.
* @param mConnection A previously established service connection
*/
public void doBindService(ServiceConnection mConnection){
this.mConnection=mConnection;
Log.i(TAG,"*****************binding **************************");
try {
Intent intent2=new Intent("com.t2.biofeedback.IBioFeedbackService");
bindService(intent2,mConnection,Context.BIND_AUTO_CREATE);
Log.i(TAG,"*****************binding SUCCESS**************************");
mIsBound=true;
}
catch ( Exception e) {
Log.i(TAG,"*****************binding FAIL**************************");
Log.e(TAG,e.toString());
}
}