public RecorderButton(Context context, AttributeSet attrs) { super(context, attrs); String dir = PathUtil.getInstance().getVoicePath().getPath(); Log.i("info", dir); mAudioManager = AudioManager.getInstance(dir); mAudioManager.setOnAudioStateListener(this); mHandler = new WeakHandler(this); mDialogManager = new DialogManager(getContext()); setOnLongClickListener(new OnLongClickListener() { @Override public boolean onLongClick(View v) { Vibrator vibrator = (Vibrator) getContext().getSystemService(Context.VIBRATOR_SERVICE); assert vibrator != null; vibrator.vibrate(new long[]{5, 9, 5, 9, 5, 9}, -1); mReady = true; mAudioManager.prepareAudio(); return false; } }); }
voiceFilePath = PathUtil.getInstance().getVoicePath() + "/" + voiceFileName; file = new File(voiceFilePath); recorder.setOutputFile(file.getAbsolutePath());
voiceFilePath = PathUtil.getInstance().getVoicePath() + "/" + voiceFileName; file = new File(voiceFilePath); recorder.setOutputFile(file.getAbsolutePath());
voiceFilePath = PathUtil.getInstance().getVoicePath() + "/" + voiceFileName; file = new File(voiceFilePath); recorder.setOutputFile(file.getAbsolutePath());
voiceFilePath = PathUtil.getInstance().getVoicePath() + "/" + voiceFileName; file = new File(voiceFilePath); recorder.setOutputFile(file.getAbsolutePath());
voiceFilePath = PathUtil.getInstance().getVoicePath() + "/" + voiceFileName; file = new File(voiceFilePath); recorder.setOutputFile(file.getAbsolutePath());
voiceFilePath = PathUtil.getInstance().getVoicePath() + "/" + voiceFileName; file = new File(voiceFilePath); recorder.setOutputFile(file.getAbsolutePath());
voiceFilePath = PathUtil.getInstance().getVoicePath() + "/" + voiceFileName; file = new File(voiceFilePath); recorder.setOutputFile(file.getAbsolutePath());
mRecordBtn = (ImageButton) findViewById(R.id.record_menu_image_btn); setMotionEventSplittingEnabled(false); String dir = PathUtil.getInstance().getVoicePath().getPath(); mAudioManager = AudioManager.getInstance(dir); mAudioManager.setOnAudioStateListener(this);