forked from droidknights/DroidKnightsApp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[작업내용] - Glance Library 추가 (targetSDK 버전 제한으로 beta01 버전 적용) - 북마크된 세션 표시 위젯 기능 개발 - 타이틀 클릭 시 앱 실행 - 앱 내 세션 북마크 추가 시 위젯에 리스트 업데이트 하도록 구현 - 위젯에서 세션 클릭 시 앱 - 해당 세션 상세 정보 화면 이동 - 세션 카드 - 타이틀, 시작 ~ 종료 시간, 발표자 표시 [TODO] - 발표자가 2인 이상일 경우 이름 표시할 수 있도록 로직 수정 (현재 발표자가 2인 이상인 경우 없음) - 위젯 내 북마크 해제 버튼 추가
- Loading branch information
1 parent
955bbba
commit eec8ed8
Showing
23 changed files
with
470 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
feature/main/src/main/java/com/droidknights/app2023/feature/main/MainViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ android { | |
|
||
dependencies { | ||
implementation(libs.kotlinx.immutable) | ||
implementation(projects.widget) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,6 @@ include( | |
":feature:setting", | ||
":feature:contributor", | ||
":feature:bookmark", | ||
|
||
":widget" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
plugins { | ||
id("droidknights.android.library") | ||
id("droidknights.android.compose") | ||
} | ||
|
||
android { | ||
namespace = "com.droidknights.app2023.widget" | ||
} | ||
|
||
dependencies { | ||
implementation(libs.androidx.glance) | ||
implementation(libs.androidx.glance.appwidget) | ||
|
||
implementation(projects.core.designsystem) | ||
|
||
implementation(projects.core.domain) | ||
implementation(project(mapOf("path" to ":core:model"))) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.droidknights.app2023 | ||
|
||
import android.content.Context | ||
import android.content.Intent | ||
import androidx.glance.action.Action | ||
import androidx.glance.appwidget.action.actionStartActivity | ||
|
||
fun actionStartActivityWithSessionId(context: Context, sessionId: String): Action = | ||
actionStartActivity( | ||
Intent( | ||
context.packageManager.getLaunchIntentForPackage( | ||
context.packageName | ||
) | ||
).putExtra(DroidKnightsWidget.KEY_SESSION_ID, sessionId) | ||
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK) | ||
) | ||
|
||
fun actionLaunchIntentForPackage(context: Context): Action = actionStartActivity( | ||
Intent( | ||
context.packageManager.getLaunchIntentForPackage( | ||
context.packageName | ||
) | ||
) | ||
) |
16 changes: 16 additions & 0 deletions
16
widget/src/main/kotlin/com/droidknights/app2023/Command.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.droidknights.app2023 | ||
|
||
import android.appwidget.AppWidgetManager | ||
import android.content.Context | ||
import android.content.Intent | ||
|
||
fun sendWidgetUpdateCommand(context: Context) { | ||
context.sendBroadcast( | ||
Intent( | ||
context, | ||
DroidKnightsWidgetReceiver::class.java | ||
).setAction( | ||
AppWidgetManager.ACTION_APPWIDGET_UPDATE | ||
) | ||
) | ||
} |
Oops, something went wrong.