Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f7361bbc9 | ||
|
|
aa63d86a10 | ||
|
|
eb6aad8527 |
@@ -20,8 +20,8 @@ android {
|
|||||||
applicationId = "com.example.shiftalarm"
|
applicationId = "com.example.shiftalarm"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 106
|
versionCode = 109
|
||||||
versionName = "1.0.6"
|
versionName = "1.0.9"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,17 +6,15 @@
|
|||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
|
||||||
|
|
||||||
<!-- Alarm & Full Screen -->
|
<!-- Alarm & Full Screen -->
|
||||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
||||||
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
|
|
||||||
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
|
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
|
||||||
|
|
||||||
<!-- Service & Notification -->
|
<!-- Service & Notification -->
|
||||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
@@ -42,12 +40,11 @@
|
|||||||
android:name=".AlarmActivity"
|
android:name=".AlarmActivity"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:excludeFromRecents="true"
|
android:excludeFromRecents="true"
|
||||||
android:taskAffinity=""
|
|
||||||
android:theme="@style/Theme.AppCompat.NoActionBar"
|
android:theme="@style/Theme.AppCompat.NoActionBar"
|
||||||
android:showWhenLocked="true"
|
android:showWhenLocked="true"
|
||||||
android:turnScreenOn="true"
|
android:turnScreenOn="true"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleInstance"
|
||||||
android:documentLaunchMode="never"
|
android:documentLaunchMode="never"
|
||||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||||
android:allowEmbedded="false"
|
android:allowEmbedded="false"
|
||||||
@@ -94,12 +91,8 @@
|
|||||||
|
|
||||||
<service
|
<service
|
||||||
android:name=".AlarmForegroundService"
|
android:name=".AlarmForegroundService"
|
||||||
android:foregroundServiceType="specialUse"
|
android:foregroundServiceType="mediaPlayback"
|
||||||
android:exported="false">
|
android:exported="false" />
|
||||||
<property
|
|
||||||
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
|
|
||||||
android:value="Alarm playback and ringing notification" />
|
|
||||||
</service>
|
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
@@ -110,6 +103,7 @@
|
|||||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
android:resource="@xml/provider_paths" />
|
android:resource="@xml/provider_paths" />
|
||||||
</provider>
|
</provider>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -71,11 +71,18 @@ class AlarmForegroundService : Service() {
|
|||||||
|
|
||||||
// 4. Foreground 시작
|
// 4. Foreground 시작
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { // Android 14+
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { // Android 14+
|
||||||
startForeground(NOTIFICATION_ID, notification, android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE)
|
startForeground(NOTIFICATION_ID, notification, android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK)
|
||||||
} else {
|
} else {
|
||||||
startForeground(NOTIFICATION_ID, notification)
|
startForeground(NOTIFICATION_ID, notification)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 5. 사용 중일 때도 즉시 전체화면 AlarmActivity 화면 띄우기
|
||||||
|
try {
|
||||||
|
startActivity(fullScreenIntent)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
|
||||||
return START_NOT_STICKY
|
return START_NOT_STICKY
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,42 @@ import androidx.activity.ComponentActivity
|
|||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.core.app.ActivityCompat
|
import androidx.core.app.ActivityCompat
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import kotlinx.coroutines.*
|
||||||
|
|
||||||
object AlarmPermissionUtil {
|
object AlarmPermissionUtil {
|
||||||
|
|
||||||
|
private var monitorJob: Job? = null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 시스템 설정 화면에서 사용자가 권한을 허용했을 때 뒤로가기를 누르지 않아도 앱으로 즉시 자동 복귀시킵니다.
|
||||||
|
*/
|
||||||
|
fun monitorAndAutoReturn(activity: Activity, isGrantedCheck: () -> Boolean) {
|
||||||
|
monitorJob?.cancel()
|
||||||
|
monitorJob = CoroutineScope(Dispatchers.Main).launch {
|
||||||
|
var count = 0
|
||||||
|
while (count < 150 && isActive) { // 최대 60초간 400ms 주기로 체크
|
||||||
|
delay(400)
|
||||||
|
count++
|
||||||
|
if (isGrantedCheck()) {
|
||||||
|
try {
|
||||||
|
val returnIntent = Intent(activity, SettingsActivity::class.java).apply {
|
||||||
|
flags = Intent.FLAG_ACTIVITY_REORDER_TO_FRONT or Intent.FLAG_ACTIVITY_SINGLE_TOP
|
||||||
|
}
|
||||||
|
activity.startActivity(returnIntent)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun cancelAutoReturn() {
|
||||||
|
monitorJob?.cancel()
|
||||||
|
monitorJob = null
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 전체 권한 상태를 확인하고 필요한 경우 통합 안내 다이얼로그를 표시합니다.
|
* 전체 권한 상태를 확인하고 필요한 경우 통합 안내 다이얼로그를 표시합니다.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -81,32 +81,20 @@ class AlarmReceiver : BroadcastReceiver() {
|
|||||||
|
|
||||||
Log.d(TAG, "ForegroundService 시작 완료")
|
Log.d(TAG, "ForegroundService 시작 완료")
|
||||||
|
|
||||||
// 2. AlarmActivity 직접 실행 (알람 화면 표시)
|
// 2. AlarmActivity 직접 즉시 실행 (사용 중일 때도 전체화면 알람 창 띄우기)
|
||||||
val activityIntent = Intent(context, AlarmActivity::class.java).apply {
|
val activityIntent = Intent(context, AlarmActivity::class.java).apply {
|
||||||
putExtra("EXTRA_SHIFT", intent?.getStringExtra("EXTRA_SHIFT") ?: "근무")
|
putExtra("EXTRA_SHIFT", intent?.getStringExtra("EXTRA_SHIFT") ?: "근무")
|
||||||
putExtra("EXTRA_SOUND", intent?.getStringExtra("EXTRA_SOUND"))
|
putExtra("EXTRA_SOUND", intent?.getStringExtra("EXTRA_SOUND"))
|
||||||
putExtra("EXTRA_SNOOZE", intent?.getIntExtra("EXTRA_SNOOZE", 5) ?: 5)
|
putExtra("EXTRA_SNOOZE", intent?.getIntExtra("EXTRA_SNOOZE", 5) ?: 5)
|
||||||
putExtra("EXTRA_SNOOZE_REPEAT", intent?.getIntExtra("EXTRA_SNOOZE_REPEAT", 3) ?: 3)
|
putExtra("EXTRA_SNOOZE_REPEAT", intent?.getIntExtra("EXTRA_SNOOZE_REPEAT", 3) ?: 3)
|
||||||
// 중요: 새 태스크로 실행 (FLAG_ACTIVITY_NEW_TASK)
|
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT or Intent.FLAG_ACTIVITY_NO_USER_ACTION)
|
||||||
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
|
||||||
// 기존 인스턴스 재사용 및 최상위로 가져오기
|
|
||||||
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
|
||||||
addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP)
|
|
||||||
// 잠금 화면 위에 표시
|
|
||||||
addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT)
|
|
||||||
// 화면 켜기
|
|
||||||
addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 지연 후 Activity 시작 (ForegroundService가 알림을 먼저 표시하도록)
|
|
||||||
android.os.Handler(android.os.Looper.getMainLooper()).postDelayed({
|
|
||||||
try {
|
try {
|
||||||
context.startActivity(activityIntent)
|
context.startActivity(activityIntent)
|
||||||
Log.d(TAG, "AlarmActivity 실행 완료")
|
Log.d(TAG, "AlarmActivity 즉시 실행 완료")
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e(TAG, "AlarmActivity 실행 실패", e)
|
Log.e(TAG, "AlarmActivity 실행 실패", e)
|
||||||
}
|
}
|
||||||
}, 500)
|
|
||||||
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e(TAG, "알람 실행 실패", e)
|
Log.e(TAG, "알람 실행 실패", e)
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ class FragmentSettingsBasic : Fragment() {
|
|||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
AlarmPermissionUtil.cancelAutoReturn()
|
||||||
updatePermissionStatuses()
|
updatePermissionStatuses()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,7 +233,10 @@ class FragmentSettingsBasic : Fragment() {
|
|||||||
val prefs = requireContext().getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
val prefs = requireContext().getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
||||||
|
|
||||||
binding.btnBatteryOptimize.setOnClickListener {
|
binding.btnBatteryOptimize.setOnClickListener {
|
||||||
AlarmPermissionUtil.requestBatteryOptimization(requireContext())
|
AlarmPermissionUtil.requestBatteryOptimization(requireActivity())
|
||||||
|
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
||||||
|
AlarmPermissionUtil.getBatteryOptimizationStatus(requireContext())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnExactAlarm.setOnClickListener {
|
binding.btnExactAlarm.setOnClickListener {
|
||||||
@@ -240,23 +244,35 @@ class FragmentSettingsBasic : Fragment() {
|
|||||||
val intent = Intent(Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM).apply {
|
val intent = Intent(Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM).apply {
|
||||||
data = Uri.parse("package:${requireContext().packageName}")
|
data = Uri.parse("package:${requireContext().packageName}")
|
||||||
}
|
}
|
||||||
startActivity(intent)
|
requireActivity().startActivity(intent)
|
||||||
|
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
||||||
|
AlarmPermissionUtil.getExactAlarmStatus(requireContext())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnOverlayPermission.setOnClickListener {
|
binding.btnOverlayPermission.setOnClickListener {
|
||||||
AlarmPermissionUtil.requestOverlayPermission(requireContext())
|
AlarmPermissionUtil.requestOverlayPermission(requireActivity())
|
||||||
|
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
||||||
|
AlarmPermissionUtil.getOverlayStatus(requireContext())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnFullScreenIntent.setOnClickListener {
|
binding.btnFullScreenIntent.setOnClickListener {
|
||||||
AlarmPermissionUtil.requestFullScreenIntentPermission(requireContext())
|
AlarmPermissionUtil.requestFullScreenIntentPermission(requireActivity())
|
||||||
|
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
||||||
|
AlarmPermissionUtil.getFullScreenIntentStatus(requireContext())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnPermissionSettings.setOnClickListener {
|
binding.btnPermissionSettings.setOnClickListener {
|
||||||
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply {
|
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply {
|
||||||
data = Uri.parse("package:${requireContext().packageName}")
|
data = Uri.parse("package:${requireContext().packageName}")
|
||||||
}
|
}
|
||||||
startActivity(intent)
|
requireActivity().startActivity(intent)
|
||||||
|
AlarmPermissionUtil.monitorAndAutoReturn(requireActivity()) {
|
||||||
|
AlarmPermissionUtil.isAllPermissionsGranted(requireContext())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnCheckUpdate.setOnClickListener {
|
binding.btnCheckUpdate.setOnClickListener {
|
||||||
|
|||||||
@@ -63,9 +63,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets ->
|
ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets ->
|
||||||
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||||
val density = resources.displayMetrics.density
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||||
val p = (8 * density).toInt()
|
|
||||||
v.setPadding(systemBars.left + p, systemBars.top + p, systemBars.right + p, systemBars.bottom + p)
|
|
||||||
insets
|
insets
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -347,13 +345,46 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
// Update Header Status Text with Permission Warning if needed
|
// Update Header Status Text with Permission Warning if needed
|
||||||
val shiftForViewingTeam = withContext(Dispatchers.IO) { repo.getShift(today, currentViewTeam, factory) }
|
val shiftForViewingTeam = withContext(Dispatchers.IO) { repo.getShift(today, currentViewTeam, factory) }
|
||||||
val teamSuffix = if (currentViewTeam == selectedTeam) " (내 반)" else " (${currentViewTeam}반)"
|
val teamSuffix = if (currentViewTeam == selectedTeam) "" else " (${currentViewTeam}반)"
|
||||||
|
|
||||||
if (currentViewTeam == selectedTeam && !AlarmPermissionUtil.getExactAlarmStatus(this@MainActivity)) {
|
if (currentViewTeam == selectedTeam && !AlarmPermissionUtil.getExactAlarmStatus(this@MainActivity)) {
|
||||||
binding.todayStatusText.text = "⚠️ 정확한 알람 권한이 필요합니다 (설정 필요)"
|
binding.todayStatusText.text = "⚠️ 정확한 알람 권한이 필요합니다 (설정 필요)"
|
||||||
binding.todayStatusText.setTextColor(androidx.core.content.ContextCompat.getColor(this@MainActivity, R.color.warning_red))
|
binding.todayStatusText.setTextColor(androidx.core.content.ContextCompat.getColor(this@MainActivity, R.color.warning_red))
|
||||||
} else {
|
} else {
|
||||||
binding.todayStatusText.text = "오늘의 근무: $shiftForViewingTeam$teamSuffix"
|
val prefix = "오늘의 근무: "
|
||||||
|
val fullText = "$prefix$shiftForViewingTeam$teamSuffix"
|
||||||
|
val spannable = android.text.SpannableStringBuilder(fullText)
|
||||||
|
|
||||||
|
val shiftColorRes = when (shiftForViewingTeam) {
|
||||||
|
"주간", "주" -> R.color.shift_ju
|
||||||
|
"석간", "석" -> R.color.shift_seok
|
||||||
|
"야간", "야" -> R.color.shift_ya
|
||||||
|
"주간 맞교대" -> R.color.shift_jumat
|
||||||
|
"야간 맞교대" -> R.color.shift_yamat
|
||||||
|
"휴무", "휴가" -> R.color.shift_off
|
||||||
|
"월차", "연차" -> R.color.secondary
|
||||||
|
"반월", "반년" -> R.color.shift_red
|
||||||
|
"교육" -> R.color.primary
|
||||||
|
else -> R.color.text_primary
|
||||||
|
}
|
||||||
|
val shiftColor = androidx.core.content.ContextCompat.getColor(this@MainActivity, shiftColorRes)
|
||||||
|
val startIndex = prefix.length
|
||||||
|
val endIndex = startIndex + shiftForViewingTeam.length
|
||||||
|
|
||||||
|
spannable.setSpan(
|
||||||
|
android.text.style.ForegroundColorSpan(shiftColor),
|
||||||
|
startIndex,
|
||||||
|
endIndex,
|
||||||
|
android.text.Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||||
|
)
|
||||||
|
spannable.setSpan(
|
||||||
|
android.text.style.StyleSpan(android.graphics.Typeface.BOLD),
|
||||||
|
startIndex,
|
||||||
|
endIndex,
|
||||||
|
android.text.Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||||
|
)
|
||||||
|
|
||||||
|
binding.todayStatusText.text = spannable
|
||||||
binding.todayStatusText.setTextColor(androidx.core.content.ContextCompat.getColor(this@MainActivity, R.color.text_secondary))
|
binding.todayStatusText.setTextColor(androidx.core.content.ContextCompat.getColor(this@MainActivity, R.color.text_secondary))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M21,10.12h-6.78l2.74,-2.82c-2.73,-2.7 -7.15,-2.8 -9.88,-0.1 -2.73,2.71 -2.73,7.08 0,9.79s7.15,2.71 9.88,0C18.32,15.65 19,14.08 19,12.1h2c0,2.49 -0.95,4.83 -2.73,6.6 -3.76,3.73 -9.85,3.73 -13.6,0 -3.76,-3.73 -3.76,-9.78 0,-13.51 3.76,-3.73 9.84,-3.73 13.6,0L21,2.42v7.7z"/>
|
||||||
|
</vector>
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
android:id="@+id/headerRoot"
|
android:id="@+id/headerRoot"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="12dp"
|
android:paddingTop="2dp"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="4dp"
|
||||||
android:paddingHorizontal="20dp"
|
android:paddingHorizontal="20dp"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingTop="32dp"
|
android:paddingTop="4dp"
|
||||||
android:paddingBottom="16dp"
|
android:paddingBottom="8dp"
|
||||||
android:paddingStart="24dp"
|
android:paddingStart="24dp"
|
||||||
android:paddingEnd="24dp"
|
android:paddingEnd="24dp"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
|||||||
@@ -469,8 +469,8 @@
|
|||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/ic_bell"
|
android:src="@drawable/ic_update"
|
||||||
app:tint="@color/primary"/>
|
app:tint="#5856D6"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -478,7 +478,7 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="최신 버전 확인"
|
android:text="최신 버전 확인"
|
||||||
android:textColor="@color/primary"
|
android:textColor="@color/text_primary"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold"/>
|
android:textStyle="bold"/>
|
||||||
|
|
||||||
|
|||||||
+13
-21
@@ -6,25 +6,17 @@ import shutil
|
|||||||
|
|
||||||
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
|
token = "e3b515eaa0a6683c921ca3bf718e281ed30a6075"
|
||||||
owner_repo = "sanjeok77/ShiftRing"
|
owner_repo = "sanjeok77/ShiftRing"
|
||||||
tag = "v1.0.6"
|
tag = "v1.0.9"
|
||||||
title = "v1.0.6 - 달력 월간 이동 깜빡임 완전 제거, 하루 메모 고가독성 색상 적용, 부가기능 및 기본 설정(근무 관리) 아이콘/색상 개편"
|
title = "v1.0.9 - 메인 및 설정 화면 상단 빈 여백 완전 제거 및 인앱 APK 원클릭 업데이트 복원"
|
||||||
body = """## 🚀 ShiftRing v1.0.6 릴리즈
|
body = """## 🚀 ShiftRing v1.0.9 릴리즈
|
||||||
|
|
||||||
### 🌟 주요 변경 및 개선 사항
|
### 🌟 주요 변경 및 개선 사항
|
||||||
1. **달력 월간 이동 시 깜빡임(Flicker) 완전 제거 (`MainActivity.kt`)**:
|
1. **📐 메인화면 상단 '교대링' 글자 위 빈 여백 공간 완전 제거 (`activity_main.xml`, `MainActivity.kt`)**:
|
||||||
- 이동 대상 월의 데이터 로딩 및 어댑터 갱신을 슬라이드 애니메이션 시작 전 완벽히 완료하여, 전환 도중의 화면 깜빡임과 데이터 리로드 잔상을 100% 제거
|
- WindowInsets 및 헤더 레이아웃의 중복 패딩을 최적화하여 타이틀 상단 불필요한 공백을 완전히 없애고 시각적 안정감을 확보
|
||||||
2. **하루 메모 가독성 극대화 (`item_day.xml`)**:
|
2. **📐 설정화면 상단 '설정' 타이틀 위 빈 여백 제거 (`activity_settings.xml`)**:
|
||||||
- 기존 연한 녹색 대신 고대비 볼드 텍스트(`@color/text_primary`, `textStyle="bold"`)를 적용하여 어떤 테마에서도 메모 내용이 선명하게 읽히도록 개선
|
- `settingsHeader`의 과도한 상단 패딩(32dp)을 축소하여 상단 여백을 컴팩트하고 균형 있게 조정
|
||||||
3. **부가기능 탭 아이콘 및 고유 색상 전면 개편 (`fragment_settings_additional.xml`)**:
|
3. **🔄 인앱 APK 원클릭 다운로드 & 설치 업데이트 방식 복원 (`AppUpdateManager.kt`, `AndroidManifest.xml`)**:
|
||||||
- 물때 정보 표시: 물결 아이콘 (`ic_tide`, 스카이블루 `#0EA5E9`)
|
- 앱 내에서 바로 업데이트 진행 상태를 확인하고 원클릭으로 즉시 설치할 수 있는 편리한 기존 인앱 업데이트 다이얼로그 방식으로 복원"""
|
||||||
- 화면 테마 설정: 팔레트 아이콘 (`ic_palette`, 퍼플 `#AF52DE`)
|
|
||||||
- 사용 설명서: 메모 아이콘 (`ic_memo`, 블루 `#0284C7`)
|
|
||||||
- 업데이트 정보: 벨 아이콘 (`ic_bell`, 오렌지 `#FF9500`)
|
|
||||||
- 앱 공유하기: 공유 아이콘 (`ic_share`, 그린 `#34C759`)
|
|
||||||
4. **기본 설정 / 근무 관리 항목 아이콘 및 색상 개편 (`fragment_settings_basic.xml`)**:
|
|
||||||
- 근무 회사: 빌딩/팩토리 아이콘 (`ic_factory`, 블루 `#007AFF`)
|
|
||||||
- 나의 근무 반: 사용자 아이콘 (`ic_user`, 그린 `#34C759`)
|
|
||||||
- 다른 앱 위에 표시: 레이어 아이콘 (`ic_layers`, 시안 `#00C7BE`)"""
|
|
||||||
|
|
||||||
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):
|
||||||
@@ -62,10 +54,10 @@ print("Updated app.apk at project root.")
|
|||||||
|
|
||||||
# Update version.json
|
# Update version.json
|
||||||
v_info = {
|
v_info = {
|
||||||
"versionCode": 106,
|
"versionCode": 109,
|
||||||
"versionName": "1.0.6",
|
"versionName": "1.0.9",
|
||||||
"apkUrl": direct_url,
|
"apkUrl": direct_url,
|
||||||
"changelog": "v1.0.6: 월간 이동 깜빡임 완전 제거, 메모 고가독성 텍스트, 부가기능 및 근무 관리 아이콘/색상 개편",
|
"changelog": "v1.0.9: 메인/설정 상단 빈 여백 제거, 인앱 APK 업데이트 복원",
|
||||||
"forceUpdate": False
|
"forceUpdate": False
|
||||||
}
|
}
|
||||||
with open("version.json", "w", encoding="utf-8") as f:
|
with open("version.json", "w", encoding="utf-8") as f:
|
||||||
@@ -77,7 +69,7 @@ print(f"Updated version.json with apkUrl: {direct_url}")
|
|||||||
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.0.6 - 달력 월간 이동 깜빡임 완전 제거, 하루 메모 고가독성 색상 적용, 부가기능 및 근무 관리 아이콘/색상 개편"
|
commit_msg = "v1.0.9 - 메인 및 설정 화면 상단 빈 여백 완전 제거 및 인앱 APK 원클릭 업데이트 복원"
|
||||||
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": 106,
|
"versionCode": 109,
|
||||||
"versionName": "1.0.6",
|
"versionName": "1.0.9",
|
||||||
"apkUrl": "https://git.webpluss.net/attachments/39cd66d9-61cd-442a-8f47-95b967b41bc4",
|
"apkUrl": "https://git.webpluss.net/attachments/f72482fb-9a5f-4572-bacf-955b505b2c2b",
|
||||||
"changelog": "v1.0.6: 월간 이동 깜빡임 완전 제거, 메모 고가독성 텍스트, 부가기능 및 근무 관리 아이콘/색상 개편",
|
"changelog": "v1.0.9: 메인/설정 상단 빈 여백 제거, 인앱 APK 업데이트 복원",
|
||||||
"forceUpdate": false
|
"forceUpdate": false
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user