v1.1.4 - 기기 사용 중 전체화면 알람 팝업 보장 및 설정 화면 상단 닫기 아이콘 배치로 화면 공간 극대화
This commit is contained in:
@@ -78,9 +78,20 @@ class AlarmForegroundService : Service() {
|
||||
|
||||
// 5. 사용 중일 때도 즉시 전체화면 AlarmActivity 화면 띄우기
|
||||
try {
|
||||
startActivity(fullScreenIntent)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||
val options = android.app.ActivityOptions.makeBasic().apply {
|
||||
setPendingIntentBackgroundActivityStartMode(android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED)
|
||||
}
|
||||
fullScreenPendingIntent.send(this, 0, null, null, null, null, options.toBundle())
|
||||
} else {
|
||||
fullScreenPendingIntent.send()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
try {
|
||||
startActivity(fullScreenIntent)
|
||||
} catch (e2: Exception) {
|
||||
e2.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
return START_NOT_STICKY
|
||||
|
||||
Reference in New Issue
Block a user