private TimerTask mTimerTask = null;
private boolean bFlag = false;
if(null == mTimer)
mTimer = new Timer();
if(null == mTimerTask){
mTimerTask = new TimerTask() {
@Override
public void run() {
if(bFlag){
mHandler.sendEmptyMessage(MsgDefine.MSG_GPS_FAILED);
}
if(null != mTimer)
mTimer.cancel();
if(null != mTimerTask)
mTimerTask.cancel();
}
};
}
mTimer.schedule(mTimerTask, 60000);//one minute