protected internal override void onServiceConnectionResponse(SAPeerAgent peerAgent, SASocket socket, int result) { if (result == CONNECTION_SUCCESS) { // SERVICE_CONNECTION_RESULT_OK this.mConnectionHandler = socket; // Toast.makeText(getBaseContext(), R.string.ConnectionEstablishedMsg, Toast.LENGTH_LONG).show(); mImageListReceiverRegistered.onServiceConnectionResponse(result); } }
public virtual bool closeConnection() { if (mConnectionHandler != null) { mConnectionHandler.close(); mConnectionHandler = null; } return(true); }
protected override void OnServiceConnectionResponse(SAPeerAgent p0, SASocket socket, int result) { if ((result == SAAgent.ConnectionSuccess)) { if ((socket != null)) { _mSocketServiceProvider = ((ProviderServiceSocket)(socket)); _mSocketServiceProvider.Send(CHANNEL_ID, System.Text.Encoding.ASCII.GetBytes("Connected")); } } else if ((result == SAAgent.ConnectionAlreadyExist)) { Android.Util.Log.Debug(TAG, "onServiceConnectionResponse, CONNECTION_ALREADY_EXIST"); } }
protected override void OnServiceConnectionResponse(SAPeerAgent p0, SASocket socket, int result) { // Cache(socket); if ((result == SAAgent.ConnectionSuccess)) { if ((socket != null)) { mSocketServiceProvider = ((ProviderServiceSocket)(socket)); mSocketServiceProvider.Send(CHANNEL_ID, System.Text.Encoding.ASCII.GetBytes(Message)); } } else if ((result == SAAgent.ConnectionAlreadyExist)) { #if DEBUG Console.WriteLine("onServiceConnectionResponse, CONNECTION_ALREADY_EXIST"); #endif } }
protected internal override void onServiceConnectionResponse(SAPeerAgent peerAgent, SASocket socket, int result) { if (result == SAAgent.CONNECTION_SUCCESS) { this.mConnectionHandler = (ServiceConnection)socket; updateTextView("Connected"); } else if (result == SAAgent.CONNECTION_ALREADY_EXIST) { updateTextView("Connected"); Toast.makeText(BaseContext, "CONNECTION_ALREADY_EXIST", Toast.LENGTH_LONG).show(); } else if (result == SAAgent.CONNECTION_DUPLICATE_REQUEST) { Toast.makeText(BaseContext, "CONNECTION_DUPLICATE_REQUEST", Toast.LENGTH_LONG).show(); } else { Toast.makeText(BaseContext, [email protected], Toast.LENGTH_LONG).show(); } }
protected internal override void onServiceConnectionResponse(SAPeerAgent peerAgent, SASocket socket, int result) { Log.i(TAG, "onServiceConnectionResponse: result - " + result); if (socket == null) { if (result == SAAgent.CONNECTION_ALREADY_EXIST) { Toast.makeText(BaseContext, "CONNECTION_ALREADY_EXIST", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(BaseContext, "Connection could not be made. Please try again", Toast.LENGTH_SHORT).show(); } } else { Toast.makeText(BaseContext, "Connection established for FT", Toast.LENGTH_SHORT).show(); } }
protected internal override void onServiceConnectionResponse(SAPeerAgent peer, SASocket socket, int result) { Log.i(TAG, "onServiceConnectionResponse: result - " + result); if (result == SAAgent.CONNECTION_SUCCESS) { if (socket != null) { mConnection = (ServiceConnection)socket; Toast.makeText(BaseContext, "Connection established for FT", Toast.LENGTH_SHORT).show(); } } }
protected internal override void onServiceConnectionResponse(SAPeerAgent peerAgent, SASocket socket, int result) { if (result == SAAgent.CONNECTION_SUCCESS) { if (socket != null) { mConnectionHandler = (ServiceConnection)socket; } } else if (result == SAAgent.CONNECTION_ALREADY_EXIST) { Log.e(TAG, "onServiceConnectionResponse, CONNECTION_ALREADY_EXIST"); } }
protected internal override void onServiceConnectionResponse(SAPeerAgent peerAgent, SASocket socket, int result) { if (result == SAAgent.CONNECTION_SUCCESS) { if (socket != null) { mConnectionHandler = (ServiceConnection) socket; } } else if (result == SAAgent.CONNECTION_ALREADY_EXIST) { Log.e(TAG, "onServiceConnectionResponse, CONNECTION_ALREADY_EXIST"); } }
protected internal override void onServiceConnectionResponse(SAPeerAgent peerAgent, SASocket socket, int result) { if (result == SAAgent.CONNECTION_SUCCESS) { this.mConnectionHandler = (ServiceConnection) socket; updateTextView("Connected"); } else if (result == SAAgent.CONNECTION_ALREADY_EXIST) { updateTextView("Connected"); Toast.makeText(BaseContext, "CONNECTION_ALREADY_EXIST", Toast.LENGTH_LONG).show(); } else if (result == SAAgent.CONNECTION_DUPLICATE_REQUEST) { Toast.makeText(BaseContext, "CONNECTION_DUPLICATE_REQUEST", Toast.LENGTH_LONG).show(); } else { Toast.makeText(BaseContext, [email protected], Toast.LENGTH_LONG).show(); } }
protected internal override void onServiceConnectionResponse(SAPeerAgent peer, SASocket socket, int result) { Log.i(TAG, "onServiceConnectionResponse: result - " + result); if (result == SAAgent.CONNECTION_SUCCESS) { if (socket != null) { mConnection = (ServiceConnection) socket; Toast.makeText(BaseContext, "Connection established for FT", Toast.LENGTH_SHORT).show(); } } }
protected internal override void onServiceConnectionResponse(SAPeerAgent peerAgent, SASocket socket, int result) { if (result == CONNECTION_SUCCESS && socket != null) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final GalleryProviderConnection myConnection = (GalleryProviderConnection) socket; GalleryProviderConnection myConnection = (GalleryProviderConnection)socket; if (mConnectionsMap == null) { mConnectionsMap = new SparseArray <GalleryProviderConnection>(); } myConnection.mConnectionId = (int)(DateTimeHelperClass.CurrentUnixTimeMillis() & 255); mConnectionsMap.put(myConnection.mConnectionId, myConnection); mBackgroundHandler.post(() => { Toast.makeText(BaseContext, [email protected], Toast.LENGTH_SHORT).show(); }); } }
public virtual bool closeConnection() { if (mConnectionHandler != null) { mConnectionHandler.close(); mConnectionHandler = null; } return true; }
protected internal override void onServiceConnectionResponse(SAPeerAgent peerAgent, SASocket socket, int result) { if (result == CONNECTION_SUCCESS && socket != null) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final GalleryProviderConnection myConnection = (GalleryProviderConnection) socket; GalleryProviderConnection myConnection = (GalleryProviderConnection) socket; if (mConnectionsMap == null) { mConnectionsMap = new SparseArray<GalleryProviderConnection>(); } myConnection.mConnectionId = (int)(DateTimeHelperClass.CurrentUnixTimeMillis() & 255); mConnectionsMap.put(myConnection.mConnectionId, myConnection); mBackgroundHandler.post(() => { Toast.makeText(BaseContext, [email protected], Toast.LENGTH_SHORT).show(); }); } }