Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(mobile): expose Android Live Update chips and settings #11457

ClosedSunkenInTime(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/11457/headopened View on GitHub

Showing 9 changed files with 70 additions and 1 deletion (loading 6).

x
0 of 9 viewed, 9 left
8 additions and 1 deletionapps/mobile/modules/t3-agent-notifications/android/src/main/java/expo/modules/t3agentnotifications/AgentNotifications.ktModified
View file
@@ -212,7 +212,11 @@
if (lines.isEmpty()) body else lines.joinToString("\n")
val notification = base(context, ACTIVITY_CHANNEL)
- .setContentTitle(data["activity_title"].orEmpty().take(120))
+ .setContentTitle(
+ data["activity_title"]?.takeIf {
+ it.isNotBlank()
+ }?.take(120) ?: "Agent activity"
+ )
.setContentText(body)
.setStyle(style)
.setOngoing(active).setOnlyAlertOnce(true).setSilent(true)
@@ -220,6 +224,9 @@
// Live Updates must remain uncolorized to qualify for promotion.
.setColorized(false)
.setRequestPromotedOngoing(active)
+ .setShortCriticalText(
+ if (active) data["activity_chip"]?.takeIf { it.isNotBlank() }?.take(7) ?: "Active" else null
+ )
.setContentIntent(contentIntent(context, scheme, data["activity_path"], ACTIVITY_ID))
.setDeleteIntent(dismissIntent)
.addAction(0, "Dismiss", dismissIntent)
22 additions and 0 deletionsapps/mobile/modules/t3-agent-notifications/android/src/main/java/expo/modules/t3agentnotifications/T3AgentNotificationsModule.ktModified
View file
@@ -1,5 +1,9 @@
package expo.modules.t3agentnotifications
​