Ejemplo n.º 1
0
  private void onProfileChanged(int newProfile) {
    LinphoneCore lc = LinphoneManager.getLc();
    lc.setUploadBandwidth(bandwidthes[newProfile][0]);
    lc.setDownloadBandwidth(bandwidthes[newProfile][1]);

    if (lc.isIncall()) {
      CallManager.getInstance().reinvite();
    } else {
      updateWithProfileSettings(lc, null);
    }
  }
Ejemplo n.º 2
0
  public void switchCamera() {
    try {
      int videoDeviceId = LinphoneManager.getLc().getVideoDevice();
      videoDeviceId = (videoDeviceId + 1) % AndroidCameraConfiguration.retrieveCameras().length;
      LinphoneManager.getLc().setVideoDevice(videoDeviceId);
      CallManager.getInstance().updateCall();

      // previous call will cause graph reconstruction -> regive preview
      // window
      if (mCaptureView != null) {
        LinphoneManager.getLc().setPreviewWindow(mCaptureView);
      }
    } catch (ArithmeticException ae) {
      Log.e("Cannot swtich camera : no camera");
    }
  }