Hocam örnek üzerinde göstermek gerekirse.
1.Ornek Olarak;
[code]public class MainActivity extends Activity{
....
...
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
bufferSize = AudioRecord.getMinBufferSize(RECORDER_SAMPLERATE,RECORDER_CHANNELS,RECORDER_AUDIO_ENCODING);
}.
.
.
.
public void startRecording(){
recorder = new AudioRecord(MediaRecorder.AudioSource.MIC,
RECORDER_SAMPLERATE, RECORDER_CHANNELS,RECORDER_AUDIO_ENCODING, bufferSize);
recorder.startRecording();
isRecording = true;
recordingThread = new Thread(new Runnable() {
@Override
public void run() {
writeAudioDataToFile();
}
},"AudioRecorder Thread");
recordingThread.start();
}
.
.
.
[/code] Böyle Bir activity class'ımzda startRecord metot'umuzu var.
Bu metotdu;
[code]public class CustomPhoneStateListener extends PhoneStateListener {.
.
.
.
}[/code] Bu class'ımda nasıl çağıracağım