private void startObexSession() {

    mBatch.mStatus = Constants.BATCH_STATUS_RUNNING;

    mCurrentShare = mBatch.getPendingShare();
    if (mCurrentShare == null) {
      /*
       * TODO catch this error
       */
      Log.e(TAG, "Unexpected error happened !");
      return;
    }
    if (V) Log.v(TAG, "Start session for info " + mCurrentShare.mId + " for batch " + mBatch.mId);

    if (mBatch.mDirection == BluetoothShare.DIRECTION_OUTBOUND) {
      if (V) Log.v(TAG, "Create Client session with transport " + mTransport.toString());
      mSession = new BluetoothOppObexClientSession(mContext, mTransport);
    } else if (mBatch.mDirection == BluetoothShare.DIRECTION_INBOUND) {
      /*
       * For inbounds transfer, a server session should already exists
       * before BluetoothOppTransfer is initialized. We should pass in a
       * mSession instance.
       */
      if (mSession == null) {
        /** set current share as error */
        Log.e(TAG, "Unexpected error happened !");
        markBatchFailed();
        mBatch.mStatus = Constants.BATCH_STATUS_FAILED;
        return;
      }
      if (V) Log.v(TAG, "Transfer has Server session" + mSession.toString());
    }

    mSession.start(mSessionHandler, mBatch.getNumShares());
    processCurrentShare();
  }