это хранить данные в sharedPreferencesкак получить дату, время для календаря от sharedpreferences
SharedPreferences prefsDate = getSharedPreferences("Date", MODE_PRIVATE);
SharedPreferences.Editor editor = prefsDate.edit();
editor.putString("Date", textDate.getText().toString());
editor.commit();
SharedPreferences prefsTime = getSharedPreferences("Time", MODE_PRIVATE);
SharedPreferences.Editor edit = prefsTime.edit();
edit.putString("Time", textTime.getText().toString());
edit.commit();
SharedPreferences prefs = getSharedPreferences("Event", MODE_PRIVATE);
SharedPreferences.Editor edt = prefs.edit();
edt.putString("Event", event.getText().toString());
edt.commit();
здесь я ставлю календарь, но как я могу получить значение для этого (заменить 0)?
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH,0);
calendar.set(Calendar.MONTH,0);
calendar.set(Calendar.YEAR,0);
calendar.set(Calendar.HOUR_OF_DAY,0);
calendar.set(Calendar.MINUTE, 0);
Intent myIntent = new Intent(MainActivity.this, AlarmReceiver.class);
pendingIntent = PendingIntent.getBroadcast(MainActivity.this, 0, myIntent, 0);
alarmManager.set(AlarmManager.RTC, calendar.getTimeInMillis(), pendingIntent);
Пожалуйста, следуйте приведенным ниже ответам @ H.almamari – Lampard