I want to create a system that prevents the user from entering the app if the date and time are not configured properly on the user's device.
same as WhatsApp lock:
Can this be done with a Firebase date and time as a reference?
Does anyone have any idea how this lockout is done?
Here's what I've done so far:
Calendar calFordDate = Calendar.getInstance();
SimpleDateFormat currentDate = new SimpleDateFormat("dd-MMMM-yyyy");
saveCurrentDate = currentDate.format(calFordDate.getTime());
Calendar calFordTime = Calendar.getInstance();
SimpleDateFormat currentTime = new SimpleDateFormat("HH:mm:ss");
saveCurrentTime = currentTime.format(calFordTime.getTime());
PostRandomName = saveCurrentDate + saveCurrentTime;