private void stopButtonClicked() { if (SinchServiceInterface != null) { SinchServiceInterface.stopClient(); } finish(); }
public override void onDestroy() { if (SinchServiceInterface != null) { SinchServiceInterface.stopClient(); } base.onDestroy(); }
public override void onDestroy() { if (SinchServiceInterface != null) { SinchServiceInterface.removeMessageClientListener(this); SinchServiceInterface.stopClient(); } base.onDestroy(); }
private void declineClicked() { mAudioPlayer.stopRingtone(); Call call = SinchServiceInterface.getCall(mCallId); if (call != null) { call.hangup(); } finish(); }
private void endCall() { mAudioPlayer.stopProgressTone(); Call call = SinchServiceInterface.getCall(mCallId); if (call != null) { call.hangup(); } finish(); }
public override void onServiceConnected() { Call call = SinchServiceInterface.getCall(mCallId); if (call != null) { call.addCallListener(new SinchCallListener(this)); mCallerName.Text = call.RemoteUserId; mCallState.Text = call.State.ToString(); } else { Log.e(TAG, "Started with invalid callId, aborting."); finish(); } }
protected internal override void onServiceConnected() { Call call = SinchServiceInterface.getCall(mCallId); if (call != null) { call.addCallListener(new SinchCallListener(this)); TextView remoteUser = (TextView)findViewById(R.id.remoteUser); remoteUser.Text = call.RemoteUserId; } else { Log.e(TAG, "Started with invalid callId, aborting"); finish(); } }
private void answerClicked() { mAudioPlayer.stopRingtone(); Call call = SinchServiceInterface.getCall(mCallId); if (call != null) { call.answer(); Intent intent = new Intent(this, typeof(CallScreenActivity)); intent.putExtra(SinchService.CALL_ID, mCallId); startActivity(intent); } else { finish(); } }
private void callButtonClicked() { string userName = mCallName.Text.ToString(); if (userName.Length == 0) { Toast.makeText(this, "Please enter a user to call", Toast.LENGTH_LONG).show(); return; } Call call = SinchServiceInterface.callUserVideo(userName); string callId = call.CallId; Intent callScreen = new Intent(this, typeof(CallScreenActivity)); callScreen.putExtra(SinchService.CALL_ID, callId); startActivity(callScreen); }
private void updateUI() { if (SinchServiceInterface == null) { return; // early } Call call = SinchServiceInterface.getCall(mCallId); if (call != null) { mCallerName.Text = call.RemoteUserId; mCallState.Text = call.State.ToString(); if (call.State == CallState.ESTABLISHED) { addVideoViews(); } } }
private void sendMessage() { string recipient = mTxtRecipient.Text.ToString(); string textBody = mTxtTextBody.Text.ToString(); if (recipient.Length == 0) { Toast.makeText(this, "No recipient added", Toast.LENGTH_SHORT).show(); return; } if (textBody.Length == 0) { Toast.makeText(this, "No text message", Toast.LENGTH_SHORT).show(); return; } SinchServiceInterface.sendMessage(recipient, textBody); mTxtTextBody.Text = ""; }
private void loginClicked() { string userName = mLoginName.Text.ToString(); if (userName.Length == 0) { Toast.makeText(this, "Please enter a name", Toast.LENGTH_LONG).show(); return; } if (!SinchServiceInterface.Started) { SinchServiceInterface.startClient(userName); showSpinner(); } else { openPlaceCallActivity(); } }
public override void onServiceConnected() { Call call = SinchServiceInterface.getCall(mCallId); if (call != null) { if (!mAddedListener) { call.addCallListener(new SinchCallListener(this)); mAddedListener = true; } } else { Log.e(TAG, "Started with invalid callId, aborting."); finish(); } updateUI(); }
private void callButtonClicked() { string userName = mCallName.Text.ToString(); if (userName.Length == 0) { Toast.makeText(this, "Please enter a user to call", Toast.LENGTH_LONG).show(); return; } try { Call call = SinchServiceInterface.callUser(userName); string callId = call.CallId; Intent callScreen = new Intent(this, typeof(CallScreenActivity)); callScreen.putExtra(SinchService.CALL_ID, callId); startActivity(callScreen); } catch (MissingPermissionException e) { ActivityCompat.requestPermissions(this, new string[] { e.RequiredPermission }, 0); } }
private void answerClicked() { mAudioPlayer.stopRingtone(); Call call = SinchServiceInterface.getCall(mCallId); if (call != null) { try { call.answer(); Intent intent = new Intent(this, typeof(CallScreenActivity)); intent.putExtra(SinchService.CALL_ID, mCallId); startActivity(intent); } catch (MissingPermissionException e) { ActivityCompat.requestPermissions(this, new string[] { e.RequiredPermission }, 0); } } else { finish(); } }
private void InitializeInstanceFields() { mServiceInterface = new SinchServiceInterface(this); }
public override void onServiceConnected() { SinchServiceInterface.addMessageClientListener(this); ButtonEnabled = true; }
private void InitializeInstanceFields() { mSinchServiceInterface = new SinchServiceInterface(this); }
public SinchService() { mSinchServiceInterface = new SinchServiceInterface(this); }