I am taking the Current date by using the following sets of lines.
java.util.Calendar calc = java.util.Calendar.getInstance();
int day = calc.get(java.util.Calendar.DATE);
int month = calc.get(java.util.Calendar.MONTH)+1;
int year = calc.get(java.util.Calendar.YEAR);
I am getting date but what if Mobile date is not of the current date. I am matching my mobile date with server date Their date is current and mobile date is not current.
Is their any validation if mobile date is not current then show notification.
The URL http://timeanddate.com gives current date and time for your current location.
If you can send HTTP request to this server you will get html or xml file. If you decode that file with parsers available in android you will get current date.
I didn't tried, but definitely possible. Try if you are interested.