I am building an Android application that sets an alarm based on my application's server time.
By comparing GMT and application server time am trying to create an alarm.
for example: GMT = 10.30 am and server time = 4.30 am, so i need to set alarm after 1hour/2hour from server time.
Example code:
Calendar calender=Calendar.getInstance(TimeZone.getTimeZone("GMT"));
calender.set(Calendar.HOUR,-6); // my server running time is less than 6 hours of GMT time.
calender.set(Calendar.MINUTE,0);
calender.set(Calendar.SECOND,0);
can anyone has idea on how to set alarm
How do I set the alarm?