Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package saic.media.audio.clint;
- import java.io.IOException;
- import android.app.Activity;
- import android.os.Bundle;
- import android.view.View;
- import android.view.View.OnClickListener;
- import android.widget.Button;
- import android.widget.TextView;
- public class RecordAudio extends Activity {
- /** Called when the activity is first created. */
- TextView test;
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
- final AudioHelper audio = new AudioHelper("test/tmp.3gp");
- Button btnRecord = (Button) findViewById(R.id.btnRecordAudio);
- btnRecord.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- try {
- audio.start();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement