74.7 Initializing the Activity
The next step is to modify the activity to perform a number of initialization tasks. Remaining within the MainActivity.java file, modify the code as follows:
package com.ebookfrenzy.audioapp;
import java.io.IOException;
import android.media.MediaRecorder;
import android.os.Environment;
import android.media.MediaPlayer;
.
.
public class MainActivity extends AppCompatActivity {
private ActivityMainBinding binding;
private static MediaRecorder mediaRecorder;
private static MediaPlayer mediaPlayer;
private static String audioFilePath;
private boolean isRecording = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate...