I'm at loss of what to do and require some advice. My app currently uses the device's time instead of the "correct time". Is there any way I can display the "correct time" and not the device's time? For example, when the user changes the device's time, the textview's time follows the new device's time. However, i don't want that to happen.
The following is my codes:
//start time
private void updateTextView() {
Calendar a = Calendar.getInstance();
int year = a.get(Calendar.YEAR);
int month = a.get(Calendar.MONTH) + 1;
int date = a.get(Calendar.DATE);
int hourOfDay = a.get(Calendar.HOUR_OF_DAY);
int minute = a.get(Calendar.MINUTE);
datetime_start = (TextView) findViewById(R.id.inputStartTime);
datetime_start.setText(year + "-" + month + "-" + date + " " + String.valueOf(hourOfDay) + ":" + String.valueOf(minute) + ":00");
}
If possible, please advice me what to do. I'm a beginner in Java Coding and is currently coding my school project. Thank you.