feat: iOS 동기화 — 알림설정, Quick Save, 일지 요약바, 디자인토큰, BLE필터 제거, 그래프 축·클립·Placement 확대

- ReminderSettingsView: 간격 리스트+체크, 유동 토글, 팝업 알림, 요약, 권한 배너 (iOS ReminderView 동일)
- ReminderService: 기본값 iOS 동기화(120분, 8시), 5종 랜덤 메시지, usePopup/isFlexible/permissionGranted
- PiezoMonitoringView: 배뇨기록 다이얼로그 iOS DiaryRecordSheet 스타일 + Quick Save
- VoidingDiaryView: 요약 바(건수+총량+평균), 의료지표 4+3 배열, 총 횟수 추가
- DesignTokens: iOS DS enum과 동일 값 (44dp touch, 12dp medium radius, spacing md=16/lg=24/xl=32)
- DeviceScanView: BLE prefix 필터 제거 (VBT 등 신규 기기 지원)
- WaveformChart: Y축(amplitude)/X축(depth mm) 라벨, clip으로 셀 오버플로 방지
- PlacementGuideView: 센서 레이아웃 확대(300→400dp), 스캔 후 채널별 에코 그래프 표시

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-22 14:03:02 +09:00
parent 5a084ac5a9
commit d8db7671ac
7 changed files with 563 additions and 222 deletions
@@ -51,11 +51,11 @@ class ReminderService private constructor(private val context: Context) {
}
var intervalMinutes: Int
get() = prefs.getInt("interval_minutes", 180) // default 3h
get() = prefs.getInt("interval_minutes", 120)
set(value) { prefs.edit().putInt("interval_minutes", value).apply() }
var startHour: Int
get() = prefs.getInt("start_hour", 7)
get() = prefs.getInt("start_hour", 8)
set(value) { prefs.edit().putInt("start_hour", value).apply() }
var endHour: Int
@@ -70,9 +70,16 @@ class ReminderService private constructor(private val context: Context) {
get() = prefs.getBoolean("use_vibration", true)
set(value) { prefs.edit().putBoolean("use_vibration", value).apply() }
var flexMinutes: Int
get() = prefs.getInt("flex_minutes", 0)
set(value) { prefs.edit().putInt("flex_minutes", value).apply() }
var usePopup: Boolean
get() = prefs.getBoolean("use_popup", true)
set(value) { prefs.edit().putBoolean("use_popup", value).apply() }
var isFlexible: Boolean
get() = prefs.getBoolean("is_flexible", true)
set(value) { prefs.edit().putBoolean("is_flexible", value).apply() }
val permissionGranted: Boolean
get() = NotificationManagerCompat.from(context).areNotificationsEnabled()
fun scheduleNext() {
if (!isEnabled) return
@@ -141,16 +148,30 @@ class ReminderService private constructor(private val context: Context) {
alarmManager.cancel(pendingIntent)
}
private val reminderMessages = listOf(
"배뇨 시간입니다! 도뇨 준비를 해주세요.",
"규칙적인 배뇨는 건강의 기본입니다!",
"화장실에 다녀오세요! 💧",
"배뇨 시간이에요. 건강한 습관을 유지하세요!",
"잊지 마세요! 화장실 갈 시간입니다."
)
fun showNotification() {
val builder = NotificationCompat.Builder(context, CHANNEL_ID)
.setSmallIcon(R.drawable.ic_launcher_foreground)
.setContentTitle("배뇨 시간")
.setContentText("도뇨 시간입니다. 배뇨를 진행해 주세요.")
.setContentTitle("VesiScan 알림")
.setContentText(reminderMessages.random())
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setAutoCancel(true)
if (useSound) {
builder.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))
} else {
builder.setSilent(true)
}
if (!usePopup) {
builder.setPriority(NotificationCompat.PRIORITY_LOW)
}
try {