Repeating Audio Recording with AlarmManager

I want to create an App that records audio on a given date by a DatePicker and a given time by a TimePicker. Furthermore it is important that the App records audio a week later at the same time.

I tried to set up an AlarmManager that starts to record audio at the wanted time. So far it works to record one time but unfortunately I do not know how to record audio a week later.

Here is MainActivity.java:

    TimePicker timePicker;
    DatePicker datePicker;
    AlarmManager am;
    PendingIntent pi;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        timePicker = (TimePicker) findViewById(R.id.timePicker);
        timePicker.setIs24HourView(true);
        datePicker = (DatePicker) findViewById(R.id.datePicker);

        findViewById(R.id.buttonAlarm).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                setAlarm();
            }
        });
    }

    public void setAlarm() {
        Calendar calendar = Calendar.getInstance();
        if (android.os.Build.VERSION.SDK_INT >= 23) {
            calendar.set(datePicker.getYear(), datePicker.getMonth(), datePicker.getDayOfMonth(),
                    timePicker.getHour(), timePicker.getMinute(), 0);
        } else {
            calendar.set(datePicker.getYear(), datePicker.getMonth(), datePicker.getDayOfMonth(),
                    timePicker.getCurrentHour(), timePicker.getCurrentMinute(), 0);
        }

        am = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
        Intent i = new Intent(this, MyAlarm.class);
        pi = PendingIntent.getBroadcast(this, 0, i, PendingIntent.FLAG_ONE_SHOT);
        //am.set(AlarmManager.RTC, calendar.getTimeInMillis(), pi);
        //am.setRepeating(AlarmManager.RTC, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY*7, pi);
        am.setRepeating(AlarmManager.RTC, calendar.getTimeInMillis(), 2*60*1000, pi);

        Toast.makeText(this, "Time is set", Toast.LENGTH_SHORT).show();
    }

And this is MyAlarm.java:

    String pathSave = "";
    MediaRecorder mediaRecorder;
    MainActivity mainactivity = new MainActivity();

    //the method will be fired when the alarm is triggerred
    @Override
    public void onReceive(final Context context, Intent intent) {

        Toast.makeText(context, "RECORDING...", Toast.LENGTH_LONG).show();

        final MediaPlayer mediaPlayer = MediaPlayer.create(context, Settings.System.DEFAULT_RINGTONE_URI);
        mediaPlayer.start();

        pathSave = Environment.getExternalStorageDirectory().getAbsolutePath() + "/" + UUID.randomUUID().toString() + "_audio_record.3gp";
        setupMediaRecorder();

        try {
            mediaRecorder.prepare();
            mediaRecorder.start();

            new Handler().postDelayed(new Runnable() {
                @Override
                public void run() {
                    mediaPlayer.start();
                    mediaRecorder.stop();
                    Toast.makeText(context, "RECORDING STOPPED", Toast.LENGTH_LONG).show();
                }
            }, 10000);

            //delayMilli: 60000
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private void setupMediaRecorder() {
        mediaRecorder = new MediaRecorder();
        mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
        mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
        mediaRecorder.setAudioEncoder(MediaRecorder.OutputFormat.AMR_NB);
        mediaRecorder.setOutputFile(pathSave);
    }

I also tried to implement this:

am.setRepeating(AlarmManager.RTC, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY*7, pi);

But this did not work.