diff --git a/android/build.gradle.kts b/android/build.gradle.kts
index d83b2709..0e0c256c 100644
--- a/android/build.gradle.kts
+++ b/android/build.gradle.kts
@@ -65,6 +65,8 @@ dependencies {
implementation(platform(libs.androidx.compose.bom))
implementation(platform(libs.okhttp.bom))
implementation(libs.androidx.activity.compose)
+ implementation(libs.androidx.compose.glance)
+ implementation(libs.androidx.compose.glance.m3)
implementation(libs.androidx.compose.material)
implementation(libs.androidx.compose.material.icons.extended)
implementation(libs.androidx.compose.material3)
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index 015f3c0b..1f3db71c 100644
--- a/android/src/main/AndroidManifest.xml
+++ b/android/src/main/AndroidManifest.xml
@@ -155,6 +155,15 @@
+
+
+
+
+
+
diff --git a/android/src/main/kotlin/dev/msfjarvis/claw/android/glance/SavedPostsWidget.kt b/android/src/main/kotlin/dev/msfjarvis/claw/android/glance/SavedPostsWidget.kt
new file mode 100644
index 00000000..7c347406
--- /dev/null
+++ b/android/src/main/kotlin/dev/msfjarvis/claw/android/glance/SavedPostsWidget.kt
@@ -0,0 +1,47 @@
+/*
+ * Copyright © 2023 Harsh Shandilya.
+ * Use of this source code is governed by an MIT-style
+ * license that can be found in the LICENSE file or at
+ * https://opensource.org/licenses/MIT.
+ */
+package dev.msfjarvis.claw.android.glance
+
+import android.content.Context
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.collectAsState
+import androidx.compose.runtime.getValue
+import androidx.glance.GlanceId
+import androidx.glance.GlanceModifier
+import androidx.glance.appwidget.GlanceAppWidget
+import androidx.glance.appwidget.lazy.LazyColumn
+import androidx.glance.appwidget.lazy.items
+import androidx.glance.appwidget.provideContent
+import androidx.glance.layout.Alignment
+import androidx.glance.layout.fillMaxSize
+import androidx.glance.text.Text
+import androidx.glance.text.TextStyle
+import dev.msfjarvis.claw.database.local.SavedPost
+import java.time.Month
+import kotlinx.collections.immutable.ImmutableMap
+import kotlinx.collections.immutable.persistentMapOf
+import kotlinx.coroutines.flow.Flow
+
+class SavedPostsWidget(
+ private val savedPosts: Flow>>,
+) : GlanceAppWidget() {
+ override suspend fun provideGlance(context: Context, id: GlanceId) {
+ provideContent { MyContent() }
+ }
+
+ @Composable
+ private fun MyContent() {
+ val posts by savedPosts.collectAsState(persistentMapOf())
+
+ LazyColumn(
+ modifier = GlanceModifier.fillMaxSize(),
+ horizontalAlignment = Alignment.CenterHorizontally
+ ) {
+ items(posts.values.flatten()) { post -> Text(post.title, style = TextStyle()) }
+ }
+ }
+}
diff --git a/android/src/main/kotlin/dev/msfjarvis/claw/android/glance/WidgetReceiver.kt b/android/src/main/kotlin/dev/msfjarvis/claw/android/glance/WidgetReceiver.kt
new file mode 100644
index 00000000..377b695a
--- /dev/null
+++ b/android/src/main/kotlin/dev/msfjarvis/claw/android/glance/WidgetReceiver.kt
@@ -0,0 +1,30 @@
+/*
+ * Copyright © 2023 Harsh Shandilya.
+ * Use of this source code is governed by an MIT-style
+ * license that can be found in the LICENSE file or at
+ * https://opensource.org/licenses/MIT.
+ */
+package dev.msfjarvis.claw.android.glance
+
+import android.content.Context
+import android.content.Intent
+import androidx.glance.appwidget.GlanceAppWidget
+import androidx.glance.appwidget.GlanceAppWidgetReceiver
+import com.deliveryhero.whetstone.Whetstone
+import com.deliveryhero.whetstone.broadcastreceiver.ContributesBroadcastReceiverInjector
+import dev.msfjarvis.claw.android.viewmodel.ClawViewModel
+import javax.inject.Inject
+
+@ContributesBroadcastReceiverInjector
+class WidgetReceiver : GlanceAppWidgetReceiver() {
+
+ @Inject lateinit var viewModel: ClawViewModel
+
+ override val glanceAppWidget: GlanceAppWidget
+ get() = SavedPostsWidget(viewModel.savedPosts)
+
+ override fun onReceive(context: Context, intent: Intent) {
+ Whetstone.inject(this, context)
+ super.onReceive(context, intent)
+ }
+}
diff --git a/android/src/main/res/xml/saved_posts_widget_info.xml b/android/src/main/res/xml/saved_posts_widget_info.xml
new file mode 100644
index 00000000..98303a4b
--- /dev/null
+++ b/android/src/main/res/xml/saved_posts_widget_info.xml
@@ -0,0 +1,15 @@
+
+