Skip to content

Commit

Permalink
Fix: add BackgroundLocatioinService in MultiMode
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Chagarr committed Nov 8, 2023
1 parent 74e0853 commit c903dd2
Show file tree
Hide file tree
Showing 4 changed files with 178 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,17 @@ public void onClick(View v) {
int timePickerCurrentHour = time_picker.getCurrentHour();
int timePickerCurrentMinute = time_picker.getCurrentMinute();

//Duration duration = Duration.ofHours(numberPickerHour.getValue()).plusMinutes(numberPickerMinute.getValue());
Duration duration = Duration.ofHours(0).plusMinutes(0).plusSeconds(8);
Duration duration = Duration.ofHours(numberPickerHour.getValue()).plusMinutes(numberPickerMinute.getValue());
//Duration duration = Duration.ofHours(0).plusMinutes(0).plusSeconds(8);
LocalDate today = LocalDate.now();
LocalDateTime startTime = LocalDateTime.of(today, LocalTime.of(timePickerCurrentHour, timePickerCurrentMinute));
// 현재 시간보다 선택한 시간이 느린 경우 하루 뒤로 설정
LocalDateTime now = LocalDateTime.now();
if (startTime.isBefore(now)) {
startTime = startTime.plusDays(1);
}
RoomCreateInfo roomInfo = new RoomCreateInfo(groupName, 0, LocalDateTime.now().plusSeconds(5), numRunners, duration);
//RoomCreateInfo roomInfo = new RoomCreateInfo(groupName, 0, startTime, numRunners, duration);
//RoomCreateInfo roomInfo = new RoomCreateInfo(groupName, 0, LocalDateTime.now().plusSeconds(5), numRunners, duration);
RoomCreateInfo roomInfo = new RoomCreateInfo(groupName, 0, startTime, numRunners, duration);
new SendRoomInfoTask().execute(roomInfo); //소켓에 연결하여 패킷 전송

}
Expand Down
Loading

0 comments on commit c903dd2

Please sign in to comment.