OK guys, I am making an android timer app which keeps crashing. I am using a chronometer which resets when it reaches 25 minutes and then starts again. This is being done by a for loop in the start button onclicklistener. In the loop i have another while loop in which i assing a long type variable the value of elapsed time by the statement
// Contents of while loop inside for loop
while(found==1){
temp = chrono.getBase() + SystemClock.elapsedRealtime();
if(temp == 25*60*1000){
found--;
}
I multiplied by 1000 because time is measured in milliseconds? Am i doing this wrong or is it something else. Thanks.