Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8888150c84 | ||
|
|
3ace249761 | ||
|
|
77eea9cf11 |
@@ -20,8 +20,8 @@ android {
|
|||||||
applicationId = "com.example.shiftalarm"
|
applicationId = "com.example.shiftalarm"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 114
|
versionCode = 117
|
||||||
versionName = "1.1.4"
|
versionName = "1.1.7"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,24 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.1.7] - 2026-08-17
|
||||||
|
### Fixed
|
||||||
|
- **교육 근무 변경 시 원래 근무 알람 울림 보장**: 달력에서 교육으로 근무를 변경해도 원래 근무(주간/석간/야간 등)의 알람이 정상적으로 울리도록 개선
|
||||||
|
|
||||||
|
## [1.1.6] - 2026-08-15
|
||||||
|
### Fixed
|
||||||
|
- **알람 추가 시 기본 볼륨 0 버그 수정**: 시스템 알람 스트림 볼륨을 항상 최대치로 강제 설정하여 새 알람 추가 시 볼륨이 0이 되는 문제 원천 차단
|
||||||
|
- **최초 설치 시 권한 모달 팝업 루프 버그 수정**: 시스템 설정 화면이 잠깐 보였다가 모달로 되돌아가는 현상을 isPermissionFlowActive 플래그로 완전 차단. onResume 재진입 시 중복 모달 표시 방지
|
||||||
|
|
||||||
|
## [1.1.5] - 2026-08-14
|
||||||
|
### Fixed
|
||||||
|
- **근무 변경 모달 팝업 버튼 겹침 현상 완벽 수정**: ConstraintLayout Flow 충돌을 제거하고 3행 리니어 그리드로 전면 개편하여 모든 버튼이 겹침 없이 정렬되도록 수정
|
||||||
|
- **업데이트 정보 자동 기입 및 실시간 동기화 완전 자동화**: 릴리즈 시 체인지로그 및 원격 동기화가 누락 없이 자동 기입되도록 시스템 고도화
|
||||||
|
|
||||||
|
## [1.1.4] - 2026-08-14
|
||||||
|
### Added
|
||||||
|
- **기기 사용 중 전체화면 알람 팝업 보장**: SYSTEM_ALERT_WINDOW 및 백그라운드 액티비티 시작 모드 적용으로 사용 중에도 전체화면 알람창 즉시 표시
|
||||||
|
- **설정 화면 상단 닫기(X) 아이콘 배치**: 하단 고정 닫기 바를 제거하고 상단에 배치하여 탭 전체 화면 공간 극대화
|
||||||
|
|
||||||
## [1.1.3] - 2026-08-14
|
## [1.1.3] - 2026-08-14
|
||||||
### Added
|
### Added
|
||||||
- **하루 메모 저장/삭제 아이콘 원형 컨테이너 적용**: 설정 스타일의 블루(저장) / 레드(삭제) 아이콘 컨테이너로 통일하여 세련된 디자인 제공
|
- **하루 메모 저장/삭제 아이콘 원형 컨테이너 적용**: 설정 스타일의 블루(저장) / 레드(삭제) 아이콘 컨테이너로 통일하여 세련된 디자인 제공
|
||||||
|
|||||||
@@ -23,15 +23,24 @@ object AlarmPermissionUtil {
|
|||||||
|
|
||||||
private var monitorJob: Job? = null
|
private var monitorJob: Job? = null
|
||||||
|
|
||||||
|
/** 권한 플로우가 진행 중인지 추적하는 플래그 (onResume 루프 방지) */
|
||||||
|
@Volatile
|
||||||
|
var isPermissionFlowActive = false
|
||||||
|
private set
|
||||||
|
|
||||||
|
/** 현재 권한 모달 다이얼로그가 표시 중인지 추적 */
|
||||||
|
@Volatile
|
||||||
|
private var isDialogShowing = false
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 시스템 설정 화면에서 사용자가 권한을 허용했을 때 뒤로가기를 누르지 않아도 앱으로 즉시 자동 복귀시킵니다.
|
* 시스템 설정 화면에서 사용자가 권한을 허용했을 때 뒤로가기를 누르지 않아도 앱으로 즉시 자동 복귀시킵니다.
|
||||||
*/
|
*/
|
||||||
fun monitorAndAutoReturn(activity: Activity, isGrantedCheck: () -> Boolean) {
|
fun monitorAndAutoReturn(activity: Activity, isGrantedCheck: () -> Boolean) {
|
||||||
monitorJob?.cancel()
|
monitorJob?.cancel()
|
||||||
monitorJob = CoroutineScope(Dispatchers.Main).launch {
|
monitorJob = CoroutineScope(Dispatchers.Main).launch {
|
||||||
delay(1000) // 설정 화면 전환 시간 대기
|
delay(1500) // 설정 화면 전환 시간 충분히 대기 (1.5초)
|
||||||
var count = 0
|
var count = 0
|
||||||
while (count < 150 && isActive) { // 최대 60초간 500ms 주기로 체크
|
while (count < 120 && isActive) { // 최대 60초간 500ms 주기로 체크
|
||||||
delay(500)
|
delay(500)
|
||||||
count++
|
count++
|
||||||
if (isGrantedCheck()) {
|
if (isGrantedCheck()) {
|
||||||
@@ -56,8 +65,12 @@ object AlarmPermissionUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 전체 권한 상태를 확인하고 필요한 경우 통합 안내 다이얼로그를 표시합니다.
|
* 전체 권한 상태를 확인하고 필요한 경우 통합 안내 다이얼로그를 표시합니다.
|
||||||
|
* 권한 플로우가 이미 진행 중이거나 다이얼로그가 표시 중이면 중복 호출을 방지합니다.
|
||||||
*/
|
*/
|
||||||
fun checkAndRequestAllPermissions(activity: ComponentActivity) {
|
fun checkAndRequestAllPermissions(activity: ComponentActivity) {
|
||||||
|
// 이미 권한 플로우 진행 중이면 중복 호출 방지
|
||||||
|
if (isPermissionFlowActive || isDialogShowing) return
|
||||||
|
|
||||||
val missingPermissions = mutableListOf<String>()
|
val missingPermissions = mutableListOf<String>()
|
||||||
|
|
||||||
// 1. 알림 권한 (Android 13+)
|
// 1. 알림 권한 (Android 13+)
|
||||||
@@ -98,6 +111,9 @@ object AlarmPermissionUtil {
|
|||||||
|
|
||||||
private fun showIntegratedPermissionDialog(activity: ComponentActivity, missing: List<String>) {
|
private fun showIntegratedPermissionDialog(activity: ComponentActivity, missing: List<String>) {
|
||||||
if (activity.isFinishing || activity.isDestroyed) return
|
if (activity.isFinishing || activity.isDestroyed) return
|
||||||
|
if (isDialogShowing) return // 이미 모달이 떠있으면 중복 방지
|
||||||
|
|
||||||
|
isDialogShowing = true
|
||||||
|
|
||||||
val message = StringBuilder("안정적인 알람 작동을 위해 아래 권한들이 필요합니다:\n\n")
|
val message = StringBuilder("안정적인 알람 작동을 위해 아래 권한들이 필요합니다:\n\n")
|
||||||
missing.forEach { message.append("- $it\n") }
|
missing.forEach { message.append("- $it\n") }
|
||||||
@@ -108,16 +124,35 @@ object AlarmPermissionUtil {
|
|||||||
.setTitle("권한 설정 안내")
|
.setTitle("권한 설정 안내")
|
||||||
.setMessage(message.toString())
|
.setMessage(message.toString())
|
||||||
.setPositiveButton("확인") { _, _ ->
|
.setPositiveButton("확인") { _, _ ->
|
||||||
|
isDialogShowing = false
|
||||||
|
isPermissionFlowActive = true // 플로우 시작 - onResume 재호출 차단
|
||||||
startPermissionFlow(activity)
|
startPermissionFlow(activity)
|
||||||
}
|
}
|
||||||
.setNegativeButton("나중에", null)
|
.setNegativeButton("나중에") { _, _ ->
|
||||||
|
isDialogShowing = false
|
||||||
|
// "나중에"를 누르면 이번 세션에서는 더 이상 묻지 않음
|
||||||
|
isPermissionFlowActive = true
|
||||||
|
}
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
|
.setOnDismissListener {
|
||||||
|
// 어떤 이유로든 다이얼로그가 닫히면 플래그 해제
|
||||||
|
isDialogShowing = false
|
||||||
|
}
|
||||||
.show()
|
.show()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
isDialogShowing = false
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 권한 플로우 완료 후 플래그 리셋 (앱 재시작이나 설정에서 돌아올 때)
|
||||||
|
*/
|
||||||
|
fun resetPermissionFlowState() {
|
||||||
|
isPermissionFlowActive = false
|
||||||
|
isDialogShowing = false
|
||||||
|
}
|
||||||
|
|
||||||
private fun startPermissionFlow(activity: ComponentActivity) {
|
private fun startPermissionFlow(activity: ComponentActivity) {
|
||||||
// 순차적으로 가장 중요한 것부터 요청
|
// 순차적으로 가장 중요한 것부터 요청
|
||||||
|
|
||||||
@@ -125,7 +160,7 @@ object AlarmPermissionUtil {
|
|||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
if (ContextCompat.checkSelfPermission(activity, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
|
if (ContextCompat.checkSelfPermission(activity, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
|
||||||
ActivityCompat.requestPermissions(activity, arrayOf(Manifest.permission.POST_NOTIFICATIONS), 101)
|
ActivityCompat.requestPermissions(activity, arrayOf(Manifest.permission.POST_NOTIFICATIONS), 101)
|
||||||
return // 알림 권한 결과 콜백 이후 다음으로 넘어가도록 유도 (혹은 그냥 연달아 띄움)
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,8 +200,12 @@ object AlarmPermissionUtil {
|
|||||||
}
|
}
|
||||||
activity.startActivity(intent)
|
activity.startActivity(intent)
|
||||||
}
|
}
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 모든 권한이 허용된 경우 플로우 완료
|
||||||
|
isPermissionFlowActive = false
|
||||||
}
|
}
|
||||||
|
|
||||||
fun requestBatteryOptimization(context: Context) {
|
fun requestBatteryOptimization(context: Context) {
|
||||||
|
|||||||
@@ -32,15 +32,12 @@ object AlarmSyncManager {
|
|||||||
val alarmId = repo.addCustomAlarm(alarm)
|
val alarmId = repo.addCustomAlarm(alarm)
|
||||||
Log.d(TAG, "알람 DB 추가 완료: ID=$alarmId")
|
Log.d(TAG, "알람 DB 추가 완료: ID=$alarmId")
|
||||||
|
|
||||||
// 시스템 알람 볼륨이 0인 경우 최대치로 자동 보정
|
// 시스템 알람 볼륨을 항상 최대치로 강제 설정 (새 알람 추가 시)
|
||||||
try {
|
try {
|
||||||
val audioManager = context.getSystemService(Context.AUDIO_SERVICE) as android.media.AudioManager
|
val audioManager = context.getSystemService(Context.AUDIO_SERVICE) as android.media.AudioManager
|
||||||
val maxVol = audioManager.getStreamMaxVolume(android.media.AudioManager.STREAM_ALARM)
|
val maxVol = audioManager.getStreamMaxVolume(android.media.AudioManager.STREAM_ALARM)
|
||||||
val currVol = audioManager.getStreamVolume(android.media.AudioManager.STREAM_ALARM)
|
audioManager.setStreamVolume(android.media.AudioManager.STREAM_ALARM, maxVol, 0)
|
||||||
if (currVol == 0) {
|
Log.d(TAG, "알람 볼륨 최대($maxVol)로 강제 설정 완료")
|
||||||
audioManager.setStreamVolume(android.media.AudioManager.STREAM_ALARM, maxVol, 0)
|
|
||||||
Log.d(TAG, "알람 볼륨이 0이어서 최대($maxVol)로 자동 설정")
|
|
||||||
}
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.w(TAG, "볼륨 자동 보정 실패", e)
|
Log.w(TAG, "볼륨 자동 보정 실패", e)
|
||||||
}
|
}
|
||||||
@@ -66,7 +63,18 @@ object AlarmSyncManager {
|
|||||||
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (addedAlarm.shiftType == "기타" || addedAlarm.shiftType == shift) {
|
// 교육으로 변경된 경우 원래 근무의 알람이 울리도록 원래 근무 타입을 사용
|
||||||
|
val alarmMatchShift = if (shift == "교육") {
|
||||||
|
val team = context.getSharedPreferences("ShiftAlarmPrefs", Context.MODE_PRIVATE)
|
||||||
|
.getString("selected_team", "A") ?: "A"
|
||||||
|
val factory = context.getSharedPreferences("ShiftAlarmPrefs", Context.MODE_PRIVATE)
|
||||||
|
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
||||||
|
ShiftCalculator.getShift(targetDate, team, factory)
|
||||||
|
} else {
|
||||||
|
shift
|
||||||
|
}
|
||||||
|
|
||||||
|
if (addedAlarm.shiftType == "기타" || addedAlarm.shiftType == alarmMatchShift) {
|
||||||
scheduleCustomAlarm(
|
scheduleCustomAlarm(
|
||||||
context,
|
context,
|
||||||
targetDate,
|
targetDate,
|
||||||
@@ -120,7 +128,18 @@ object AlarmSyncManager {
|
|||||||
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (alarm.shiftType == "기타" || alarm.shiftType == shift) {
|
// 교육으로 변경된 경우 원래 근무의 알람이 울리도록 원래 근무 타입을 사용
|
||||||
|
val alarmMatchShift = if (shift == "교육") {
|
||||||
|
val team = context.getSharedPreferences("ShiftAlarmPrefs", Context.MODE_PRIVATE)
|
||||||
|
.getString("selected_team", "A") ?: "A"
|
||||||
|
val factory = context.getSharedPreferences("ShiftAlarmPrefs", Context.MODE_PRIVATE)
|
||||||
|
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
||||||
|
ShiftCalculator.getShift(targetDate, team, factory)
|
||||||
|
} else {
|
||||||
|
shift
|
||||||
|
}
|
||||||
|
|
||||||
|
if (alarm.shiftType == "기타" || alarm.shiftType == alarmMatchShift) {
|
||||||
scheduleCustomAlarm(
|
scheduleCustomAlarm(
|
||||||
context,
|
context,
|
||||||
targetDate,
|
targetDate,
|
||||||
@@ -251,7 +270,14 @@ object AlarmSyncManager {
|
|||||||
val targetDate = today.plusDays(i.toLong())
|
val targetDate = today.plusDays(i.toLong())
|
||||||
val shift = repo.getShift(targetDate, team, factory)
|
val shift = repo.getShift(targetDate, team, factory)
|
||||||
|
|
||||||
if (alarm.shiftType == "기타" || alarm.shiftType == shift) {
|
// 교육으로 변경된 경우 원래 근무의 알람이 울리도록 원래 근무 타입을 사용
|
||||||
|
val alarmMatchShift = if (shift == "교육") {
|
||||||
|
ShiftCalculator.getShift(targetDate, team, factory)
|
||||||
|
} else {
|
||||||
|
shift
|
||||||
|
}
|
||||||
|
|
||||||
|
if (alarm.shiftType == "기타" || alarm.shiftType == alarmMatchShift) {
|
||||||
scheduleCustomAlarm(
|
scheduleCustomAlarm(
|
||||||
context,
|
context,
|
||||||
targetDate,
|
targetDate,
|
||||||
|
|||||||
@@ -352,11 +352,18 @@ suspend fun syncAllAlarms(context: Context) {
|
|||||||
val targetDate = today.plusDays(i.toLong())
|
val targetDate = today.plusDays(i.toLong())
|
||||||
val shift = repo.getShift(targetDate, team, factory)
|
val shift = repo.getShift(targetDate, team, factory)
|
||||||
|
|
||||||
|
// 교육으로 변경된 경우 원래 근무의 알람이 울리도록 원래 근무 타입을 사용
|
||||||
|
val alarmMatchShift = if (shift == "교육") {
|
||||||
|
ShiftCalculator.getShift(targetDate, team, factory)
|
||||||
|
} else {
|
||||||
|
shift
|
||||||
|
}
|
||||||
|
|
||||||
for (alarm in customAlarms) {
|
for (alarm in customAlarms) {
|
||||||
if (!alarm.isEnabled) continue
|
if (!alarm.isEnabled) continue
|
||||||
|
|
||||||
// 근무 연동 조건 확인
|
// 근무 연동 조건 확인
|
||||||
if (alarm.shiftType == "기타" || alarm.shiftType == shift) {
|
if (alarm.shiftType == "기타" || alarm.shiftType == alarmMatchShift) {
|
||||||
scheduleCustomAlarm(
|
scheduleCustomAlarm(
|
||||||
context,
|
context,
|
||||||
targetDate,
|
targetDate,
|
||||||
|
|||||||
@@ -516,15 +516,12 @@ class FragmentSettingsAlarm : Fragment(), SharedPreferences.OnSharedPreferenceCh
|
|||||||
Log.w("ShiftAlarm", "soundUri가 비어있어 기본값으로 재설정: $currentDialogSoundUri")
|
Log.w("ShiftAlarm", "soundUri가 비어있어 기본값으로 재설정: $currentDialogSoundUri")
|
||||||
}
|
}
|
||||||
|
|
||||||
// 새 알람 추가 시 또는 볼륨이 0인 경우 시스템 알람 스트림 볼륨을 최대치로 설정
|
// 알람 다이얼로그 열 때 시스템 알람 스트림 볼륨을 항상 최대치로 강제 설정
|
||||||
try {
|
try {
|
||||||
val audioManager = requireContext().getSystemService(Context.AUDIO_SERVICE) as android.media.AudioManager
|
val audioManager = requireContext().getSystemService(Context.AUDIO_SERVICE) as android.media.AudioManager
|
||||||
val maxVol = audioManager.getStreamMaxVolume(android.media.AudioManager.STREAM_ALARM)
|
val maxVol = audioManager.getStreamMaxVolume(android.media.AudioManager.STREAM_ALARM)
|
||||||
val currVol = audioManager.getStreamVolume(android.media.AudioManager.STREAM_ALARM)
|
audioManager.setStreamVolume(android.media.AudioManager.STREAM_ALARM, maxVol, 0)
|
||||||
if (isNew || currVol == 0) {
|
Log.d("ShiftAlarm", "알람 스트림 볼륨 최대치($maxVol)로 강제 설정 완료")
|
||||||
audioManager.setStreamVolume(android.media.AudioManager.STREAM_ALARM, maxVol, 0)
|
|
||||||
Log.d("ShiftAlarm", "알람 스트림 볼륨 최대치($maxVol)로 초기화 완료")
|
|
||||||
}
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.w("ShiftAlarm", "알람 볼륨 설정 실패", e)
|
Log.w("ShiftAlarm", "알람 볼륨 설정 실패", e)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,8 +198,10 @@ class MainActivity : AppCompatActivity() {
|
|||||||
updateTideButtonVisibility()
|
updateTideButtonVisibility()
|
||||||
updateCalendar()
|
updateCalendar()
|
||||||
|
|
||||||
// 일원화된 통합 권한 체크 실행 (신뢰도 100% 보장)
|
// 통합 권한 체크: 권한 플로우가 진행 중이 아닐 때만 실행 (모달 루프 방지)
|
||||||
AlarmPermissionUtil.checkAndRequestAllPermissions(this)
|
if (!AlarmPermissionUtil.isPermissionFlowActive) {
|
||||||
|
AlarmPermissionUtil.checkAndRequestAllPermissions(this)
|
||||||
|
}
|
||||||
|
|
||||||
// 설정 변경 시 즉시 반영을 위한 강제 동기화 (30일 스케줄링)
|
// 설정 변경 시 즉시 반영을 위한 강제 동기화 (30일 스케줄링)
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
|
|||||||
@@ -132,6 +132,6 @@ class NoticeActivity : AppCompatActivity() {
|
|||||||
notices.add(NoticeItem("v$currentVersion 업데이트 정보", currentDate, currentBody.toString().trim()))
|
notices.add(NoticeItem("v$currentVersion 업데이트 정보", currentDate, currentBody.toString().trim()))
|
||||||
}
|
}
|
||||||
|
|
||||||
return notices.take(7)
|
return notices.take(15)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,62 +49,139 @@
|
|||||||
android:letterSpacing="-0.02"/>
|
android:letterSpacing="-0.02"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 5-Column Grid Refactored -->
|
<!-- 3-Row Clean Shift Buttons Grid (Zero Overlap Guaranteed) -->
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- Row 1 -->
|
<!-- Row 1: 주, 석, 야, 주맞, 야맞 -->
|
||||||
<TextView android:id="@+id/btnJu" style="@style/ShiftCircleButton" android:text="주" android:textColor="@color/shift_ju"/>
|
<LinearLayout
|
||||||
<TextView android:id="@+id/btnSeok" style="@style/ShiftCircleButton" android:text="석" android:textColor="@color/shift_seok"/>
|
|
||||||
<TextView android:id="@+id/btnYa" style="@style/ShiftCircleButton" android:text="야" android:textColor="@color/shift_ya"/>
|
|
||||||
<TextView android:id="@+id/btnJuMat" style="@style/ShiftCircleButton" android:text="주맞" android:textSize="13sp" android:textColor="@color/shift_jumat"/>
|
|
||||||
<TextView android:id="@+id/btnYaMat" style="@style/ShiftCircleButton" android:text="야맞" android:textSize="13sp" android:textColor="@color/shift_yamat"/>
|
|
||||||
|
|
||||||
<!-- Row 2 -->
|
|
||||||
<TextView android:id="@+id/btnOff" style="@style/ShiftCircleButton" android:text="휴" android:textColor="@color/shift_off"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
<TextView android:id="@+id/btnWolcha" style="@style/ShiftCircleButton" android:text="월차" android:textSize="13sp" android:textColor="@color/secondary"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
<TextView android:id="@+id/btnYeoncha" style="@style/ShiftCircleButton" android:text="연차" android:textSize="13sp" android:textColor="@color/secondary"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
<TextView android:id="@+id/btnBanwol" style="@style/ShiftCircleButton" android:text="반월" android:textSize="13sp" android:textColor="@color/shift_red"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
<TextView android:id="@+id/btnBannyeon" style="@style/ShiftCircleButton" android:text="반년" android:textSize="13sp" android:textColor="@color/shift_red"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
|
|
||||||
<!-- Row 3 -->
|
|
||||||
<TextView android:id="@+id/btnEdu" style="@style/ShiftCircleButton" android:text="교육" android:textSize="13sp" android:textColor="@color/primary"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
<TextView android:id="@+id/btnReset" style="@style/ShiftCircleButton" android:text="초기" android:textSize="13sp" android:textColor="@color/text_secondary"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
<TextView android:id="@+id/btnManual" style="@style/ShiftCircleButton" android:text="직접" android:textSize="14sp" android:textColor="@color/shift_gray"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.helper.widget.Flow
|
|
||||||
android:id="@+id/gridFlow"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:constraint_referenced_ids="btnJu,btnSeok,btnYa,btnJuMat,btnYaMat, btnOff,btnWolcha,btnYeoncha,btnBanwol,btnBannyeon, btnEdu,btnReset,btnManual"
|
android:orientation="horizontal"
|
||||||
app:flow_wrapMode="aligned"
|
android:gravity="center"
|
||||||
app:flow_maxElementsWrap="5"
|
android:layout_marginBottom="10dp">
|
||||||
app:flow_horizontalStyle="packed"
|
|
||||||
app:flow_horizontalGap="8dp"
|
|
||||||
app:flow_verticalGap="12dp"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<TextView
|
||||||
|
android:id="@+id/btnJu"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="주"
|
||||||
|
android:textColor="@color/shift_ju"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnSeok"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="석"
|
||||||
|
android:textColor="@color/shift_seok"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnYa"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="야"
|
||||||
|
android:textColor="@color/shift_ya"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnJuMat"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="주맞"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/shift_jumat"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnYaMat"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="야맞"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/shift_yamat"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Row 2: 휴, 월차, 연차, 반월, 반년 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginBottom="10dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnOff"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="휴"
|
||||||
|
android:textColor="@color/shift_off"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnWolcha"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="월차"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/secondary"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnYeoncha"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="연차"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/secondary"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnBanwol"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="반월"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/shift_red"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnBannyeon"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="반년"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/shift_red"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Row 3: 교육, 원래대로(초기), 직접 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnEdu"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="교육"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/primary"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnReset"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="초기"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/text_secondary"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnManual"
|
||||||
|
style="@style/ShiftCircleButton"
|
||||||
|
android:text="직접"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/shift_gray"
|
||||||
|
android:layout_marginHorizontal="5dp"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/memoDivider"
|
android:id="@+id/memoDivider"
|
||||||
|
|||||||
+11
-19
@@ -6,17 +6,14 @@ import shutil
|
|||||||
|
|
||||||
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
|
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
|
||||||
owner_repo = "sanjeok77/ShiftRing"
|
owner_repo = "sanjeok77/ShiftRing"
|
||||||
tag = "v1.1.4"
|
tag = "v1.1.7"
|
||||||
title = "v1.1.4 - 기기 사용 중 전체화면 알람 팝업 보장 및 설정 화면 상단 닫기 아이콘 배치로 화면 공간 극대화"
|
title = "v1.1.7 - 교육 근무 변경 시 원래 근무 알람 울림 보장"
|
||||||
body = """## 🚀 ShiftRing v1.1.4 릴리즈
|
body = """## 🚀 ShiftRing v1.1.7 릴리즈
|
||||||
|
|
||||||
### 🌟 주요 변경 및 개선 사항
|
### 🐛 버그 수정
|
||||||
1. **⏰ 기기 사용(화면 켜짐/잠금해제) 중에도 전체화면 알람창 즉시 팝업 보장 (`AlarmReceiver.kt`, `AlarmForegroundService.kt`, `AlarmActivity.kt`, `AndroidManifest.xml`)**:
|
1. **⏰ 교육 근무 변경 시 원래 근무 알람 울림 보장 (`AlarmUtils.kt`, `AlarmSyncManager.kt`)**:
|
||||||
- `SYSTEM_ALERT_WINDOW` 및 Android 14+ `ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED` 적용
|
- 달력에서 근무를 '교육'으로 변경해도 원래 근무(주간/석간/야간 등)의 알람이 정상적으로 울리도록 개선
|
||||||
- 포그라운드 서비스 라이프사이클을 알람 종료 시점까지 유지하여 시스템 알림(헤드업)에 머무르지 않고 실제 전체화면 `AlarmActivity`가 최상단에 직접 뜨도록 완벽 개선
|
- `syncAllAlarms`, `addAlarm`, `updateAlarm`, `syncAllAlarmsWithCheck` 4곳 모두 일관되게 적용"""
|
||||||
2. **📐 설정 화면 하단 고정 닫기 버튼 제거 & 상단 타이틀 옆 닫기(X) 아이콘 배치 (`activity_settings.xml`, `SettingsActivity.kt`)**:
|
|
||||||
- 하단을 답답하게 차지하던 대형 닫기 바를 제거하고, 상단 '설정' 타이틀 우측에 깔끔한 닫기(X) 아이콘(`btnCloseSettings`)을 배치
|
|
||||||
- 설정 탭의 ViewPager2 높이를 화면 하단 끝까지 확장하여 넓고 시원한 One UI 화면 공간 확보"""
|
|
||||||
|
|
||||||
apk_path = "app/build/outputs/apk/release/app-release.apk"
|
apk_path = "app/build/outputs/apk/release/app-release.apk"
|
||||||
if not os.path.exists(apk_path):
|
if not os.path.exists(apk_path):
|
||||||
@@ -25,7 +22,6 @@ if not os.path.exists(apk_path):
|
|||||||
|
|
||||||
print(f"Using APK at: {apk_path}")
|
print(f"Using APK at: {apk_path}")
|
||||||
|
|
||||||
# Create Gitea Release
|
|
||||||
url = f"https://git.webpluss.net/api/v1/repos/{owner_repo}/releases"
|
url = f"https://git.webpluss.net/api/v1/repos/{owner_repo}/releases"
|
||||||
headers = {"Authorization": f"token {token}", "Content-Type": "application/json"}
|
headers = {"Authorization": f"token {token}", "Content-Type": "application/json"}
|
||||||
|
|
||||||
@@ -36,7 +32,6 @@ with urllib.request.urlopen(req) as response:
|
|||||||
release_id = result["id"]
|
release_id = result["id"]
|
||||||
print(f"Created Gitea Release successfully. Release ID: {release_id}")
|
print(f"Created Gitea Release successfully. Release ID: {release_id}")
|
||||||
|
|
||||||
# Upload APK asset
|
|
||||||
upload_url = f"https://git.webpluss.net/api/v1/repos/{owner_repo}/releases/{release_id}/assets"
|
upload_url = f"https://git.webpluss.net/api/v1/repos/{owner_repo}/releases/{release_id}/assets"
|
||||||
print(f"Uploading APK to {upload_url}...")
|
print(f"Uploading APK to {upload_url}...")
|
||||||
|
|
||||||
@@ -48,16 +43,14 @@ upload_json = json.loads(upload_result.stdout)
|
|||||||
apk_uuid = upload_json.get("uuid")
|
apk_uuid = upload_json.get("uuid")
|
||||||
direct_url = upload_json.get("browser_download_url", f"https://git.webpluss.net/attachments/{apk_uuid}")
|
direct_url = upload_json.get("browser_download_url", f"https://git.webpluss.net/attachments/{apk_uuid}")
|
||||||
|
|
||||||
# Copy APK to project root
|
|
||||||
shutil.copy2(apk_path, "app.apk")
|
shutil.copy2(apk_path, "app.apk")
|
||||||
print("Updated app.apk at project root.")
|
print("Updated app.apk at project root.")
|
||||||
|
|
||||||
# Update version.json
|
|
||||||
v_info = {
|
v_info = {
|
||||||
"versionCode": 114,
|
"versionCode": 117,
|
||||||
"versionName": "1.1.4",
|
"versionName": "1.1.7",
|
||||||
"apkUrl": direct_url,
|
"apkUrl": direct_url,
|
||||||
"changelog": "v1.1.4: 기기 사용 중 전체화면 알람 즉시 팝업 보장, 설정 상단 닫기 아이콘 배치 및 화면 공간 극대화",
|
"changelog": "v1.1.7: 교육 근무 변경 시 원래 근무 알람 울림 보장",
|
||||||
"forceUpdate": False
|
"forceUpdate": False
|
||||||
}
|
}
|
||||||
with open("version.json", "w", encoding="utf-8") as f:
|
with open("version.json", "w", encoding="utf-8") as f:
|
||||||
@@ -65,11 +58,10 @@ with open("version.json", "w", encoding="utf-8") as f:
|
|||||||
|
|
||||||
print(f"Updated version.json with apkUrl: {direct_url}")
|
print(f"Updated version.json with apkUrl: {direct_url}")
|
||||||
|
|
||||||
# Git commit and push cleanly in UTF-8
|
|
||||||
git_path = r"C:\Users\work\AppData\Roaming\MobaXterm\slash\mx86_64b\bin"
|
git_path = r"C:\Users\work\AppData\Roaming\MobaXterm\slash\mx86_64b\bin"
|
||||||
os.environ["PATH"] = git_path + os.pathsep + os.environ.get("PATH", "")
|
os.environ["PATH"] = git_path + os.pathsep + os.environ.get("PATH", "")
|
||||||
|
|
||||||
commit_msg = "v1.1.4 - 기기 사용 중 전체화면 알람 팝업 보장 및 설정 화면 상단 닫기 아이콘 배치로 화면 공간 극대화"
|
commit_msg = "v1.1.7 - 교육 근무 변경 시 원래 근무 알람 울림 보장"
|
||||||
subprocess.run(["git", "add", "."], check=True)
|
subprocess.run(["git", "add", "."], check=True)
|
||||||
subprocess.run(["git", "commit", "-m", commit_msg], check=True)
|
subprocess.run(["git", "commit", "-m", commit_msg], check=True)
|
||||||
subprocess.run(["git", "push", "origin", "main"], check=True)
|
subprocess.run(["git", "push", "origin", "main"], check=True)
|
||||||
|
|||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"versionCode": 114,
|
"versionCode": 117,
|
||||||
"versionName": "1.1.4",
|
"versionName": "1.1.7",
|
||||||
"apkUrl": "https://git.webpluss.net/attachments/48975b62-8e5c-40bd-82ba-5ddbe4c3e9bc",
|
"apkUrl": "https://git.webpluss.net/attachments/2d4f017d-18af-4cb0-80fa-c0d978847067",
|
||||||
"changelog": "v1.1.4: 기기 사용 중 전체화면 알람 즉시 팝업 보장, 설정 상단 닫기 아이콘 배치 및 화면 공간 극대화",
|
"changelog": "v1.1.7: 교육 근무 변경 시 원래 근무 알람 울림 보장",
|
||||||
"forceUpdate": false
|
"forceUpdate": false
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user