I want to do an app in android for example if we program some tasks the app give as notification if the currenttime=timewespeciefied.
I have already an array that contain the time the user specified.
the problem here is to calculate the remaining time !
is there a class that calculate the remaining time ?
in my case I have multiple tasks so I must check if the time in the task in the table is already done or not.
void LeftTime(){
currenttime.settonow();
Time LeftTime=new Time();
for (int i = 0; i <TaskTable.length ; i++) {
if(currenttime.hour<=TaskTable[i].hour)
if(TaskTable.minute==0) LeftTime.minute=60-TaskTable[i].minute;
if(TaskTable[i].minute<currenttime.minute)
LeftTime.minute=currenttime-Tasktable[i].minute;
else
LeftTime.minute=60-currenttime+Tasktable[i].minute;
}
There is multiple Cases ! How I can do that.