コード例 #1
0
  @Override
  public void onInfo(MediaRecorder mr, int what, int extra) {
    EMLog.v("video", "onInfo");
    if (what == MediaRecorder.MEDIA_RECORDER_INFO_MAX_DURATION_REACHED) {
      EMLog.v("video", "max duration reached");
      stopRecording();
      btn_switch.setVisibility(View.VISIBLE);
      chronometer.stop();
      btnStart.setVisibility(View.VISIBLE);
      btnStop.setVisibility(View.INVISIBLE);
      chronometer.stop();
      if (localPath == null) {
        return;
      }
      String st3 = getResources().getString(R.string.Whether_to_send);
      new AlertDialog.Builder(this)
          .setMessage(st3)
          .setPositiveButton(
              R.string.ok,
              new DialogInterface.OnClickListener() {

                @Override
                public void onClick(DialogInterface arg0, int arg1) {
                  arg0.dismiss();
                  sendVideo(null);
                }
              })
          .setNegativeButton(R.string.cancel, null)
          .setCancelable(false)
          .show();
    }
  }
コード例 #2
0
 @Override
 public void surfaceDestroyed(SurfaceHolder arg0) {
   EMLog.v("video", "surfaceDestroyed");
 }