0
我想在我的應用程序當前時間5分鐘後設置鬧鐘。我正在使用calendar.getMinutes()+ 5獲取當前時間(分鐘)。但其不工作。有人告訴我我在做什麼錯誤?如何根據當前時間設置鬧鐘時間?
我想在我的應用程序當前時間5分鐘後設置鬧鐘。我正在使用calendar.getMinutes()+ 5獲取當前時間(分鐘)。但其不工作。有人告訴我我在做什麼錯誤?如何根據當前時間設置鬧鐘時間?
Calendar cal = Calendar.getInstance();
// add 5 minutes to the calendar object
cal.add(Calendar.MINUTE, 5);