Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

feat(android): match the iPhone's settings, widgets, calls and update notices

leepokai07cbaaf1031c
diff --git a/apps/android/app/build.gradle.kts b/apps/android/app/build.gradle.kts
index 418ba82b..7615a255 100644
--- a/apps/android/app/build.gradle.kts
+++ b/apps/android/app/build.gradle.kts
@@ -174,6 +174,9 @@ dependencies {
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.messaging)
implementation(libs.work)
+ // What Google Play has for this app (the update notice) and its in-app review prompt.
+ implementation(libs.play.app.update)
+ implementation(libs.play.review)
implementation(libs.glance)
// Remote screen video and OpenAI Realtime voice, as the iPhone app's WebRTC.
implementation(libs.webrtc)
diff --git a/apps/android/app/src/main/AndroidManifest.xml b/apps/android/app/src/main/AndroidManifest.xml
index b77df9fc..5a57e203 100644
--- a/apps/android/app/src/main/AndroidManifest.xml
+++ b/apps/android/app/src/main/AndroidManifest.xml
@@ -54,6 +54,15 @@
<intent-filter><action android:name="android.appwidget.action.APPWIDGET_UPDATE" /></intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_provider" />
</receiver>
+ <!-- Fixed-provider widgets appear as separate choices in the widget picker, as on the iPhone. -->
+ <receiver android:name=".ClaudeUsageWidgetReceiver" android:exported="true" android:label="Claude Code">
+ <intent-filter><action android:name="android.appwidget.action.APPWIDGET_UPDATE" /></intent-filter>
+ <meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_claude" />
+ </receiver>
+ <receiver android:name=".CodexUsageWidgetReceiver" android:exported="true" android:label="Codex">
+ <intent-filter><action android:name="android.appwidget.action.APPWIDGET_UPDATE" /></intent-filter>
+ <meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_codex" />
+ </receiver>
<receiver android:name=".UsageWidgetReceiver" android:exported="true" android:label="Usage limits">
<intent-filter><action android:name="android.appwidget.action.APPWIDGET_UPDATE" /></intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_usage" />
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/AccountStore.kt b/apps/android/app/src/main/kotlin/com/codync/android/AccountStore.kt
index f40dcac2..70f1b525 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/AccountStore.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/AccountStore.kt
@@ -187,6 +187,7 @@ class AccountStore(application: Application) : AndroidViewModel(application) {
fun setForeground(active: Boolean) {
foreground = active
+ ReviewPrompt.setActive(getApplication(), active)
PushDelivery.foreground = active || stores.value.any { it.state.value.voice != null }
for (store in stores.value) store.setForeground(active)
if (active && !state.value.loading) refreshCloud()
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/AnalyticsEvent.kt b/apps/android/app/src/main/kotlin/com/codync/android/AnalyticsEvent.kt
index f7812986..de92de81 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/AnalyticsEvent.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/AnalyticsEvent.kt
@@ -62,6 +62,23 @@ internal sealed class AnalyticsEvent(val name: String) {
data class SettingChanged(val setting: PhoneSetting, val on: Boolean) : AnalyticsEvent("setting_changed") {
override val properties get() = mapOf("setting" to setting.json, "on" to JsonPrimitive(on))
}
+ /** An eligible, viewed result was followed by returning to Bots (iOS `reviewOpportunity`). */
+ data class ReviewOpportunity(val completed: Int) : AnalyticsEvent("review_opportunity") {
+ override val properties get() = mapOf("completed_interactions" to JsonPrimitive(completed), "policy" to JsonPrimitive("v1"),
+ "trigger" to JsonPrimitive("return_to_bots"))
+ }
+ data class ReviewCancelled(val reason: com.codync.android.core.ReviewCancellation) : AnalyticsEvent("review_cancelled") {
+ override val properties get() = mapOf("reason" to JsonPrimitive(reason.wire), "policy" to JsonPrimitive("v1"))
+ }
+ /** The cooldown is used up and Google Play is about to be asked; not that a prompt showed. */
+ data class ReviewRequested(val completed: Int) : AnalyticsEvent("review_requested") {
+ override val properties get() = mapOf("completed_interactions" to JsonPrimitive(completed), "policy" to JsonPrimitive("v1"),
+ "trigger" to JsonPrimitive("return_to_bots"))
+ }
+ /** Rate on Google Play, in Settings (iOS `reviewLinkOpened`). */
+ data object ReviewLinkOpened : AnalyticsEvent("review_link_opened") {
+ override val properties get() = mapOf("source" to JsonPrimitive("settings"))
+ }
data class LinkOpened(val link: OutboundLink) : AnalyticsEvent("link_opened") {
override val properties get() = mapOf("link" to link.json)
}
@@ -152,7 +169,7 @@ internal enum class PhoneSetting(override val wire: String) : CatalogValue { Pus
/** What an outbound link leads to (`install_command`: an install command copied). */
internal enum class OutboundLink(override val wire: String) : CatalogValue {
- Github("github"), Demo("demo"), Tailscale("tailscale"), Privacy("privacy"), InstallCommand("install_command"),
+ Github("github"), Issues("issues"), AppStore("app_store"), Demo("demo"), Tailscale("tailscale"), Privacy("privacy"), InstallCommand("install_command"),
}
internal enum class VoiceEngineKind(override val wire: String) : CatalogValue {
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/AppStoreDrafts.kt b/apps/android/app/src/main/kotlin/com/codync/android/AppStoreDrafts.kt
index d5ed776c..b8951750 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/AppStoreDrafts.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/AppStoreDrafts.kt
@@ -75,6 +75,7 @@ fun AppStore.sendDraft(key: String, botId: String, text: String, replyTo: ReplyQ
mutableState.update { it.copy(drafts = it.drafts - key) }
persistDrafts()
onQueued()
+ ReviewPrompt.sent(getApplication(), send.nonce)
action("send:" + send.nonce) { deliver(send) }
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/AppUpdates.kt b/apps/android/app/src/main/kotlin/com/codync/android/AppUpdates.kt
new file mode 100644
index 00000000..63657d21
--- /dev/null
+++ b/apps/android/app/src/main/kotlin/com/codync/android/AppUpdates.kt
@@ -0,0 +1,90 @@
+package com.codync.android
+
+import android.content.Context
+import android.content.Intent
+import android.net.Uri
+import androidx.compose.foundation.background
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.padding
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.collectAsState
+import androidx.compose.runtime.getValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.unit.dp
+import androidx.core.content.edit
+import com.codync.android.core.UpdateReminder
+import com.codync.android.design.*
+import com.google.android.play.core.appupdate.AppUpdateManagerFactory
+import com.google.android.play.core.install.model.UpdateAvailability
+import com.google.android.play.core.ktx.requestAppUpdateInfo
+import com.kyant.shapes.RoundedRectangle
+import kotlinx.coroutines.CancellationException
+import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.flow.asStateFlow
+
+/**
+ * What Google Play has for this app, asked now and then (iOS `AppUpdates`): the update notice greys out its button while
+ * the needed version isn't on Play yet, and a newer release gets a dismissible reminder. A copy not installed from Google
+ * Play gets neither.
+ */
+internal object AppUpdates {
+ private val mutableStore = MutableStateFlow<String?>(null)
+ /** The version Play has for this phone; null until asked, or when Play can't say. */
+ val store = mutableStore.asStateFlow()
+ private val mutableDismissed = MutableStateFlow<String?>(null)
+ val dismissed = mutableDismissed.asStateFlow()
+ private var askedAt = 0L
+
+ private fun prefs(context: Context) = context.getSharedPreferences("codync-updates", Context.MODE_PRIVATE)
+
+ /** Asks Play at most every six hours (launch, foreground). */
+ suspend fun refresh(context: Context) {
+ mutableDismissed.value = prefs(context).getString("dismissedAppUpdate", null)
+ val now = System.currentTimeMillis()
+ if (now - askedAt < 6 * 3_600_000L) return
+ askedAt = now
+ try {
+ val info = AppUpdateManagerFactory.create(context).requestAppUpdateInfo()
+ mutableStore.value = if (info.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE)
+ UpdateReminder.versionOf(info.availableVersionCode().toLong()) else BuildConfig.VERSION_NAME.substringBefore('-')
+ } catch (cancelled: CancellationException) { throw cancelled }
+ catch (_: Exception) { /* Not from Google Play, or Play can't be reached: no reminder. */ }
+ }
+
+ fun dismiss(context: Context) {
+ val version = store.value ?: return
+ mutableDismissed.value = version
+ prefs(context).edit { putString("dismissedAppUpdate", version) }
+ }
+
+ /** Opens this app's Google Play page. */
+ fun open(context: Context) {
+ Analytics.capture(AnalyticsEvent.LinkOpened(OutboundLink.AppStore))
+ context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(PLAY_LISTING)).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
+ }
+}
+
+/** A quiet, dismissible note at the top of the roster that a newer release is out; everything still works (iOS `AppUpdateReminder`). */
+@Composable internal fun AppUpdateReminder(modifier: Modifier = Modifier) {
+ val context = LocalContext.current
+ val store by AppUpdates.store.collectAsState()
+ val dismissed by AppUpdates.dismissed.collectAsState()
+ val version = UpdateReminder.app(BuildConfig.VERSION_NAME, store, dismissed) ?: return
+ Row(modifier.fillMaxWidth().clip(RoundedRectangle(16.dp)).background(Palette.surface).padding(14.dp),
+ verticalAlignment = Alignment.Top, horizontalArrangement = Arrangement.spacedBy(12.dp)) {
+ Symbol("arrow.down.circle.fill", size = 22.dp, tint = Palette.text)
+ Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(6.dp)) {
+ Text(tr("Codync {version} is available").replace("{version}", version), style = Type.subheadline.semibold, color = Palette.text)
+ Text(tr("You have {version}.").replace("{version}", BuildConfig.VERSION_NAME.substringBefore('-')), style = Type.footnote, color = Palette.secondary)
+ SecondaryButton("Update", Modifier.padding(top = 4.dp)) { AppUpdates.open(context) }
+ }
+ IconButton("Dismiss", "xmark") { AppUpdates.dismiss(context) }
+ }
+}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/BotListView.kt b/apps/android/app/src/main/kotlin/com/codync/android/BotListView.kt
index 231fc2e3..61f5b729 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/BotListView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/BotListView.kt
@@ -141,6 +141,8 @@ private class ComputerRoster(context: Context, val key: String) {
// Pull to refresh reconnects every computer and asks the account for its computers again (iOS `refreshable`).
PullToRefresh({ accounts.refreshRoster() }, Modifier.fillMaxSize(), indicatorTop = top + 50.dp) {
LazyColumn(Modifier.fillMaxSize(), state = listState, contentPadding = PaddingValues(start = 16.dp, end = 16.dp, top = top + 56.dp, bottom = bottomInset)) {
+ // A newer app release (dismissible; everything still works). Computers update themselves, so a newer host gets no reminder here.
+ item("appUpdate") { AppUpdateReminder(Modifier.padding(vertical = 4.dp)) }
// One computer: its update notice leads the list. A computer waiting for an update has its card instead; its bots may not be readable yet.
if (!grouped) for (state in shown) state.mismatch?.let { mismatch -> item("update:${state.computer.id}") {
accounts.store(state.computer.id)?.let { store -> UpdateNeededCard(state, mismatch, store::requestHostUpdate, Modifier.padding(vertical = 8.dp)) }
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/BotSettingsForm.kt b/apps/android/app/src/main/kotlin/com/codync/android/BotSettingsForm.kt
index be92f8e1..2f0e30a3 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/BotSettingsForm.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/BotSettingsForm.kt
@@ -27,6 +27,8 @@ import com.codync.android.design.*
import com.kyant.shapes.RoundedRectangle
import kotlinx.serialization.json.contentOrNull
import kotlinx.serialization.json.jsonPrimitive
+import androidx.compose.ui.semantics.contentDescription
+import androidx.compose.ui.semantics.semantics
/**
* Which settings a form shows (iOS `FormPart`): all of them (the editor), what changes often (instructions and the agent:
@@ -38,6 +40,8 @@ internal enum class FormPart { All, Often, Rarely }
@Composable internal fun BotSettingsForm(state: AppState, store: AppStore, draft: BotDraft, change: (BotDraft) -> Unit, part: FormPart,
modifier: Modifier = Modifier) {
var folders by remember { mutableStateOf(false) }
+ // The Avatar row unfolds the picker (iOS `pickingAvatar`).
+ var pickingAvatar by remember { mutableStateOf(false) }
var viewingSkill by remember { mutableStateOf<SkillRef?>(null) }
var addingFallback by remember { mutableStateOf(false) }
val online = state.actualConnection is LinkState.Ready
@@ -46,14 +50,10 @@ internal enum class FormPart { All, Often, Rarely }
Column(modifier, verticalArrangement = Arrangement.spacedBy(30.dp)) {
when (part) {
FormPart.All -> {
- Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(16.dp)) {
- Box(Modifier.clip(RoundedRectangle(24.dp)).background(Palette.bubbleAgent).padding(18.dp)) {
- CharacterAvatar(draft.avatarShape, draft.avatarColor, 96.dp)
- }
- AvatarPicker(draft.avatarShape, draft.avatarColor, { change(draft.copy(avatarShape = it)) }, { change(draft.copy(avatarColor = it)) })
- draft.id?.let { CustomIconEditor("bot:$it", state, store) }
+ CardSection("Profile") {
+ avatarRows(state, store, draft, change, pickingAvatar) { pickingAvatar = !pickingAvatar }
+ nameRow(draft, change); instructionsRow(draft, change); createdByRow(state, bot)
}
- CardSection("Profile") { nameRow(draft, change); instructionsRow(draft, change); createdByRow(state, bot) }
CardSection("Agent") {
fallbackBanner(state, store, bot); computerRow(state, online)
agentRows(state, store, draft, change, bot) { addingFallback = true }; placeRows(draft, change) { folders = true }
@@ -74,8 +74,7 @@ internal enum class FormPart { All, Often, Rarely }
}
FormPart.Rarely -> {
CardSection("Profile") {
- row { AvatarPicker(draft.avatarShape, draft.avatarColor, { change(draft.copy(avatarShape = it)) }, { change(draft.copy(avatarColor = it)) }) }
- draft.id?.let { id -> row { CustomIconEditor("bot:$id", state, store) } }
+ avatarRows(state, store, draft, change, pickingAvatar) { pickingAvatar = !pickingAvatar }
nameRow(draft, change); createdByRow(state, bot)
}
// The agent and its model are on the Details page; what's left is where it works.
@@ -99,6 +98,26 @@ internal enum class FormPart { All, Often, Rarely }
@Composable private fun OfflineNote() = Text(tr("Reconnect to this computer to save settings."), style = Type.caption, color = Palette.warning)
// A bot left unnamed at creation is named from its first conversations; rename it any time after.
+/** "Avatar" with the face as it is; tapping it unfolds the picker and the custom icon (iOS `BotEditorView` Profile). */
+private fun CardRows.avatarRows(state: AppState, store: AppStore, draft: BotDraft, change: (BotDraft) -> Unit, picking: Boolean, toggle: () -> Unit) {
+ row {
+ val icon = draft.id?.let { state.icons["bot:$it"] }
+ Box(Modifier.fillMaxWidth().plainButton(action = toggle).semantics { contentDescription = "Edit Bot avatar" }) {
+ ValueRow("Avatar") {
+ Box(Modifier.clip(RoundedRectangle(10.dp)).background(Palette.bubbleAgent).padding(5.dp)) {
+ CharacterAvatar(draft.avatarShape, draft.avatarColor, 28.dp, customImage = icon?.dataUrl, customTinted = icon?.tinted == true)
+ }
+ }
+ }
+ }
+ if (picking) row {
+ Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(16.dp)) {
+ AvatarPicker(draft.avatarShape, draft.avatarColor, { change(draft.copy(avatarShape = it)) }, { change(draft.copy(avatarColor = it)) })
+ draft.id?.let { CustomIconEditor("bot:$it", state, store) }
+ }
+ }
+}
+
private fun CardRows.nameRow(draft: BotDraft, change: (BotDraft) -> Unit) =
row { Field("Name") { FieldBox(draft.name, { change(draft.copy(name = it)) }, "Name") } }
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt b/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt
index aa288bfd..21de91ec 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt
@@ -96,6 +96,11 @@ import com.kyant.shapes.Capsule
val reply = { entry: Entry -> replyId = entry.id }
// The chat ignores Full conversation over it: it stays put underneath.
val chatState = state.copy(trace = false)
+ // ponytail: "in sight" is the open chat with nothing over it, not its scroll position; add that if ratings come too early.
+ ReviewReading("${state.contextId}/${state.computer.id}/${bot.id}", state.entries.filter { it.botId == bot.id },
+ ready = details == null && viewing == null && peer == null && callLine == null && !state.trace && state.voice == null &&
+ state.drafts[bot.id]?.let { it.text.isBlank() && it.files.isEmpty() } != false && state.actualConnection is LinkState.Ready &&
+ state.mismatch == null && state.error == null && state.screenRequest == null && bot.status == "idle")
GlassStage(Modifier.fillMaxSize().background(Palette.background), chrome = {
// Down to just above the header's bottom; the bottom one stops under Jump to latest.
ScrollEdge(Edge.Top, top + 84.dp)
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/CodyncApp.kt b/apps/android/app/src/main/kotlin/com/codync/android/CodyncApp.kt
index de1a1f7e..c95040dc 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/CodyncApp.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/CodyncApp.kt
@@ -107,7 +107,8 @@ private data class Editing<T>(val computerId: String, val draft: T)
}
Root.Tabs -> MainTabs(app, states, accounts, account = { showAccount = true }, manage = { showComputers = true }, usage = { showUsage = true },
newBot = { creating = NewTarget(group = false, computerId = it) }, newGroup = { creating = NewTarget(group = true, computerId = it) },
- edit = edit, extensions = openMarketplace) { chat ->
+ edit = edit, extensions = openMarketplace, covered = showAccount || showComputers || showPairing || showUsage ||
+ marketplace != null || creating != null || access != null || editor != null || groupEditor != null || app.error != null) { chat ->
// A conversation, talking to the computer the bot lives on.
accounts.store(chat.computer.id)?.let { store -> ChatScreen(chat, store) { bot -> edit(chat.computer.id, bot) } }
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/CodyncWidgets.kt b/apps/android/app/src/main/kotlin/com/codync/android/CodyncWidgets.kt
index ac2cc3a8..618dc42c 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/CodyncWidgets.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/CodyncWidgets.kt
@@ -73,11 +73,14 @@ import kotlin.math.roundToInt
// State tab's previews: Provider usage, Usage limits, Bots and Team.
class ProviderWidget : CodyncWidget(WidgetKind.Provider)
+/** Claude Code's or Codex's usage, without a provider to choose (iOS `ClaudeUsageWidget`, `CodexUsageWidget`). */
+class ClaudeUsageWidget : CodyncWidget(WidgetKind.Provider, fixed = "claude")
+class CodexUsageWidget : CodyncWidget(WidgetKind.Provider, fixed = "codex")
class UsageWidget : CodyncWidget(WidgetKind.Usage)
class BotsWidget : CodyncWidget(WidgetKind.Bots)
class TeamWidget : CodyncWidget(WidgetKind.Team)
-abstract class CodyncWidget(private val kind: WidgetKind) : GlanceAppWidget() {
+abstract class CodyncWidget(private val kind: WidgetKind, private val fixed: String? = null) : GlanceAppWidget() {
override val sizeMode = SizeMode.Responsive(setOf(SMALL, MEDIUM, LARGE))
override val previewSizeMode = sizeMode
override suspend fun provideGlance(context: Context, id: GlanceId) {
@@ -85,7 +88,7 @@ abstract class CodyncWidget(private val kind: WidgetKind) : GlanceAppWidget() {
provideContent {
val revision by WidgetStore.changes.collectAsState()
val feed = remember(revision) { WidgetStore.feed(context) }
- val provider = remember(revision) { WidgetStore.provider(context, widget) }
+ val provider = remember(revision) { fixed ?: WidgetStore.provider(context, widget) }
val team = remember(revision) { WidgetStore.team(context, widget) }
androidx.compose.runtime.key(revision) {
WidgetCard(feed, kind, provider, team, sample = false)
@@ -93,7 +96,7 @@ abstract class CodyncWidget(private val kind: WidgetKind) : GlanceAppWidget() {
}
}
override suspend fun providePreview(context: Context, widgetCategory: Int) {
- provideContent { WidgetCard(sampleFeed(), kind, "claude", emptyList(), sample = true) }
+ provideContent { WidgetCard(sampleFeed(), kind, fixed ?: "claude", emptyList(), sample = true) }
}
private companion object {
@@ -425,6 +428,8 @@ internal fun sampleFeed(): WidgetFeed = WidgetFeed(computerId = "sample", comput
botsAt = System.currentTimeMillis(), usage = WidgetPreview.usage, usageAt = System.currentTimeMillis())
class ProviderWidgetReceiver : CodyncWidgetReceiver() { override val glanceAppWidget = ProviderWidget() }
+class ClaudeUsageWidgetReceiver : CodyncWidgetReceiver() { override val glanceAppWidget = ClaudeUsageWidget() }
+class CodexUsageWidgetReceiver : CodyncWidgetReceiver() { override val glanceAppWidget = CodexUsageWidget() }
class UsageWidgetReceiver : CodyncWidgetReceiver() { override val glanceAppWidget = UsageWidget() }
class BotsWidgetReceiver : CodyncWidgetReceiver() { override val glanceAppWidget = BotsWidget() }
class TeamWidgetReceiver : CodyncWidgetReceiver() { override val glanceAppWidget = TeamWidget() }
@@ -439,12 +444,13 @@ abstract class CodyncWidgetReceiver : GlanceAppWidgetReceiver() {
}
internal object CodyncWidgets {
- val receivers = listOf(ProviderWidgetReceiver::class.java, UsageWidgetReceiver::class.java, BotsWidgetReceiver::class.java,
- TeamWidgetReceiver::class.java)
+ val receivers = listOf(ProviderWidgetReceiver::class.java, ClaudeUsageWidgetReceiver::class.java, CodexUsageWidgetReceiver::class.java,
+ UsageWidgetReceiver::class.java, BotsWidgetReceiver::class.java, TeamWidgetReceiver::class.java)
fun installed(context: Context): Int = receivers.sumOf { AppWidgetManager.getInstance(context).getAppWidgetIds(ComponentName(context, it)).size }
suspend fun update(context: Context) {
if (installed(context) == 0) return
- ProviderWidget().updateAll(context); UsageWidget().updateAll(context); BotsWidget().updateAll(context); TeamWidget().updateAll(context)
+ ProviderWidget().updateAll(context); ClaudeUsageWidget().updateAll(context); CodexUsageWidget().updateAll(context)
+ UsageWidget().updateAll(context); BotsWidget().updateAll(context); TeamWidget().updateAll(context)
}
/** The launcher's widget picker shows each widget drawn from sample data (Android 15+); the system rate-limits it. */
suspend fun publishPreviews(context: Context) {
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ComputerSection.kt b/apps/android/app/src/main/kotlin/com/codync/android/ComputerSection.kt
index b32b8d53..64ccc718 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/ComputerSection.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/ComputerSection.kt
@@ -91,12 +91,13 @@ internal object RosterComputers {
)
}.padding(vertical = 4.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(4.dp)) {
ComputerBadge(state.hello?.text("device"), 20.dp, state.computer.color)
- Text(state.hostName, Modifier.weight(1f, fill = false), style = Type.subheadline.semibold, color = Palette.secondary,
+ // The name and the connection share the row; the connection sits at the trailing edge, before the heading's buttons.
+ Text(state.hostName, Modifier.weight(1f), style = Type.subheadline.semibold, color = Palette.secondary,
maxLines = 1, overflow = TextOverflow.Ellipsis)
- // The connection sits at the trailing edge, before the heading's buttons.
- Spacer(Modifier.weight(1f).width(8.dp))
- Text(tr(status), style = Type.subheadline, color = if (offline) Palette.warning else Palette.tertiary, maxLines = 1,
- overflow = TextOverflow.Ellipsis)
+ Box(Modifier.weight(1f).padding(start = 8.dp), contentAlignment = Alignment.CenterEnd) {
+ Text(tr(status), style = Type.subheadline, color = if (offline) Palette.warning else Palette.tertiary, maxLines = 1,
+ overflow = TextOverflow.Ellipsis)
+ }
if (link is LinkState.Ready) Symbol(if (link.route == HostRoute.Direct) "wifi" else "cloud", size = 15.dp, tint = Palette.tertiary)
Box(Modifier.size(40.dp), contentAlignment = Alignment.Center) {
Symbol("chevron.down", Modifier.rotate(turn), size = 14.dp, tint = Palette.tertiary)
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/LaunchSplash.kt b/apps/android/app/src/main/kotlin/com/codync/android/LaunchSplash.kt
index cc93ad42..e8660b18 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/LaunchSplash.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/LaunchSplash.kt
@@ -39,12 +39,18 @@ import kotlin.math.sin
* Cold launch, as iOS `LaunchSplash`: the app-icon bot pops out of the blank system splash and
* looks around while the computer catches up, then grows a little as it fades into the app.
*/
-/** The splash over the app until the store is ready, held at least 0.7 s so the motion reads. */
-@Composable internal fun LaunchLayer(loading: Boolean) {
+/**
+ * The splash over the app until the account is open and its computers have caught up ([caughtUp]; true with none), held
+ * at least 0.7 s so the motion reads and never past 1.8 s, the cached list being behind it (iOS `LaunchSplash`).
+ */
+@Composable internal fun LaunchLayer(loading: Boolean, caughtUp: Boolean) {
var visible by remember { mutableStateOf(true) }
val started = remember { System.currentTimeMillis() }
- LaunchedEffect(loading) {
- if (!loading) { delay(maxOf(0L, 700 - (System.currentTimeMillis() - started))); visible = false }
+ LaunchedEffect(loading, caughtUp) {
+ if (loading) return@LaunchedEffect
+ delay(maxOf(0L, 700 - (System.currentTimeMillis() - started)))
+ if (!caughtUp) delay(maxOf(0L, 1_800 - (System.currentTimeMillis() - started)))
+ visible = false
}
AnimatedVisibility(visible, enter = EnterTransition.None,
exit = fadeOut(tween(300)) + scaleOut(tween(300), targetScale = if (reduceMotion()) 1f else 1.15f)) { LaunchSplash() }
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/MainActivity.kt b/apps/android/app/src/main/kotlin/com/codync/android/MainActivity.kt
index 9808832a..ff5b9012 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/MainActivity.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/MainActivity.kt
@@ -94,7 +94,8 @@ class MainActivity : ComponentActivity() {
isAppearanceLightNavigationBars = !darkBars
}
}
- CodyncTheme(dark = dark) { OverlayRoot { CodyncApp(state, computers, accounts); LaunchLayer(state.loading) } }
+ CodyncTheme(dark = dark) { OverlayRoot { CodyncApp(state, computers, accounts)
+ LaunchLayer(state.loading, state.computers.all { computers[it.id]?.widgetBotsCurrent == true }) } }
}
}
}
@@ -110,7 +111,10 @@ class MainActivity : ComponentActivity() {
setIntent(intent)
handle(intent)
}
- override fun onStart() { super.onStart(); accounts.setForeground(true); Analytics.becameActive(applicationContext) }
+ override fun onStart() {
+ super.onStart(); accounts.setForeground(true); Analytics.becameActive(applicationContext)
+ lifecycleScope.launch { AppUpdates.refresh(applicationContext) }
+ }
override fun onStop() {
accounts.setForeground(false)
// A rotation isn't a trip to the background.
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/MainTabs.kt b/apps/android/app/src/main/kotlin/com/codync/android/MainTabs.kt
index 6cfe5f42..bf982b80 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/MainTabs.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/MainTabs.kt
@@ -28,7 +28,11 @@ import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.zIndex
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.unit.dp
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.ui.platform.LocalContext
import com.codync.android.core.Bot
+import com.codync.android.core.LinkState
+import com.codync.android.core.ReviewCancellation
import com.codync.android.design.*
private enum class AppTab { Bots, State, Settings }
@@ -39,12 +43,25 @@ private enum class AppTab { Bots, State, Settings }
*/
@Composable internal fun MainTabs(app: AccountContext, states: List<AppState>, accounts: AccountStore, account: () -> Unit, manage: () -> Unit,
usage: () -> Unit, newBot: (String) -> Unit, newGroup: (String) -> Unit, edit: (String, Bot) -> Unit, extensions: (String) -> Unit,
- chat: @Composable (AppState) -> Unit) {
+ covered: Boolean, chat: @Composable (AppState) -> Unit) {
var tab by rememberSaveable { mutableStateOf(AppTab.Bots) }
// The open chat, on whichever computer it lives (one at a time).
val open = states.firstOrNull { it.selectedBot != null }
// Opening a bot (notification, widget, link) always lands on the Bots tab.
if (open != null && tab != AppTab.Bots) tab = AppTab.Bots
+ // Leaving a chat whose answer was read may invite a rating, once the roster has stayed clear (iOS `RootView`).
+ val context = LocalContext.current
+ val openChat = open?.let { "${app.contextId}/${it.computer.id}/${it.selectedBot}" }
+ var lastChat by remember { mutableStateOf<String?>(null) }
+ LaunchedEffect(openChat) {
+ if (openChat != null) ReviewPrompt.cancel(context, ReviewCancellation.Interaction)
+ else lastChat?.let { ReviewPrompt.returned(context, it) }
+ lastChat = openChat
+ }
+ ReviewInvitationEffect(covered || tab != AppTab.Bots || open != null || states.isEmpty() || states.any { state ->
+ state.actualConnection !is LinkState.Ready || state.mismatch != null || state.error != null || state.screenRequest != null ||
+ state.bots.any { it.status in listOf("working", "needsInput", "error") }
+ })
AnalyticsOnAppear(AnalyticsEvent.ScreenViewed(when (tab) {
AppTab.Bots -> AnalyticsScreen.Bots
AppTab.State -> AnalyticsScreen.State
@@ -76,7 +93,10 @@ private enum class AppTab { Bots, State, Settings }
}
}
}) {
- Box(Modifier.fillMaxSize().tabLayer(tab == AppTab.Bots)) {
+ // A touch on the roster turns down a waiting invitation, as on the iPhone.
+ Box(Modifier.fillMaxSize().tabLayer(tab == AppTab.Bots).pointerInput(Unit) {
+ awaitPointerEventScope { while (true) { awaitPointerEvent(PointerEventPass.Initial); ReviewPrompt.cancel(context, ReviewCancellation.Interaction) } }
+ }) {
// A chat's entry names its computer and bot; it keeps its state while sliding away.
var shown by remember { mutableStateOf<AppState?>(null) }
if (open != null) shown = open
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/MessageComposer.kt b/apps/android/app/src/main/kotlin/com/codync/android/MessageComposer.kt
index 0e832bd9..88fc2de2 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/MessageComposer.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/MessageComposer.kt
@@ -50,6 +50,9 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
+import androidx.compose.ui.focus.onFocusChanged
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.setValue
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.input.key.Key
@@ -113,6 +116,9 @@ private enum class Trailing { Interrupt, Stop, Call, Send }
// Dictation stops with its chat or draft (another chat, an artifact's box) and when the box goes.
val dictation = remember(draftKey) { Dictation(context, scope) }
DisposableEffect(dictation) { onDispose { dictation.stop() } }
+ // Typing, files or dictation here hold off reading results and any rating invitation.
+ var focused by remember { mutableStateOf(false) }
+ ReviewInterruption(focused || files.isNotEmpty() || dictation.listening || dictation.transcribing)
val photos = rememberLauncherForActivityResult(ActivityResultContracts.PickMultipleVisualMedia(10)) { uris ->
if (uris.isNotEmpty()) store.importFiles(uris) { store.addDraftFiles(draftKey, it) }
}
@@ -213,7 +219,7 @@ private enum class Trailing { Interrupt, Stop, Call, Send }
if (ctrlEnter && trailing == Trailing.Send && canSend) send()
ctrlEnter
}
- BasicTextField(state = text, enabled = !queuing, modifier = Modifier.weight(1f).focusRequester(focus).contentReceiver(receiver).then(sendKey).padding(vertical = 10.dp),
+ BasicTextField(state = text, enabled = !queuing, modifier = Modifier.weight(1f).focusRequester(focus).onFocusChanged { focused = it.isFocused }.contentReceiver(receiver).then(sendKey).padding(vertical = 10.dp),
textStyle = Type.body.copy(color = Palette.text), cursorBrush = SolidColor(Palette.accent),
lineLimits = TextFieldLineLimits.MultiLine(maxHeightInLines = 8),
decorator = { input -> Box { if (text.text.isEmpty()) Text(placeholder, style = Type.body, color = Palette.tertiary, maxLines = 1, overflow = TextOverflow.Ellipsis); input() } })
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ReviewPrompt.kt b/apps/android/app/src/main/kotlin/com/codync/android/ReviewPrompt.kt
new file mode 100644
index 00000000..43831be5
--- /dev/null
+++ b/apps/android/app/src/main/kotlin/com/codync/android/ReviewPrompt.kt
@@ -0,0 +1,111 @@
+package com.codync.android
+
+import android.app.Activity
+import android.content.Context
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.DisposableEffect
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.collectAsState
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.remember
+import androidx.compose.ui.platform.LocalContext
+import androidx.core.content.edit
+import com.codync.android.core.Entry
+import com.codync.android.core.ReviewCancellation
+import com.codync.android.core.ReviewHistory
+import com.codync.android.core.ReviewInvitation
+import com.codync.android.core.WireJson
+import com.google.android.play.core.review.ReviewManagerFactory
+import com.google.android.play.core.ktx.launchReview
+import com.google.android.play.core.ktx.requestReview
+import kotlinx.coroutines.CancellationException
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.flow.asStateFlow
+
+/**
+ * This phone's invitation to rate Codync on Google Play (iOS `ReviewInvitation.shared` and its roster modifier): kept in
+ * the app's preferences, never sent to a computer. Google Play decides whether its prompt actually shows.
+ */
+internal object ReviewPrompt {
+ private const val KEY = "reviewInvitation.v1"
+ private var invitation: ReviewInvitation? = null
+ private val mutableOpportunity = MutableStateFlow<Long?>(null)
+ val opportunity = mutableOpportunity.asStateFlow()
+
+ private fun of(context: Context): ReviewInvitation = invitation ?: run {
+ val prefs = context.applicationContext.getSharedPreferences("codync-review", Context.MODE_PRIVATE)
+ val now = System.currentTimeMillis()
+ val saved = prefs.getString(KEY, null)?.let { runCatching { WireJson.decodeFromString(ReviewHistory.serializer(), it) }.getOrNull() }
+ ReviewInvitation(saved ?: ReviewHistory(firstUse = now), { history ->
+ prefs.edit { putString(KEY, WireJson.encodeToString(ReviewHistory.serializer(), history)) }
+ }) { event ->
+ Analytics.capture(when (event) {
+ is ReviewInvitation.Event.Opportunity -> AnalyticsEvent.ReviewOpportunity(event.completed)
+ is ReviewInvitation.Event.Cancelled -> AnalyticsEvent.ReviewCancelled(event.reason)
+ is ReviewInvitation.Event.Requested -> AnalyticsEvent.ReviewRequested(event.completed)
+ })
+ }.also { invitation = it }
+ }
+
+ private fun update(context: Context, change: ReviewInvitation.() -> Unit) {
+ val shown = of(context)
+ shown.change()
+ mutableOpportunity.value = shown.opportunity
+ }
+
+ fun setActive(context: Context, active: Boolean) = update(context) { setActive(active, System.currentTimeMillis()) }
+ fun sent(context: Context, nonce: String) = update(context) { sent(nonce, System.currentTimeMillis()) }
+ fun viewed(context: Context, chat: String, entries: List<Entry>) = update(context) { viewed(chat, entries, System.currentTimeMillis()) }
+ fun returned(context: Context, chat: String) = update(context) { returned(chat, BuildConfig.VERSION_NAME.substringBefore('-'), System.currentTimeMillis()) }
+ fun cancel(context: Context, reason: ReviewCancellation) = update(context) { cancel(reason) }
+ fun interrupt(context: Context, token: Any, active: Boolean) = update(context) { interrupt(token, active) }
+
+ /** Uses up the opportunity (and this app's own cooldown) before Google Play is asked. */
+ fun request(context: Context, token: Long): Boolean {
+ var asked = false
+ update(context) { asked = request(token, BuildConfig.VERSION_NAME.substringBefore('-'), System.currentTimeMillis()) }
+ return asked
+ }
+}
+
+/** While [active] (the composer in use, files picked, dictation), reading a result doesn't count and no invitation shows. */
+@Composable internal fun ReviewInterruption(active: Boolean) {
+ val context = LocalContext.current
+ val token = remember { Any() }
+ DisposableEffect(active) {
+ ReviewPrompt.interrupt(context, token, active)
+ onDispose { ReviewPrompt.interrupt(context, token, false) }
+ }
+}
+
+/** A finished answer at the end of [chat] that stays in sight for 3 s, with nothing over it, counts as read. */
+@Composable internal fun ReviewReading(chat: String, entries: List<Entry>, ready: Boolean) {
+ val context = LocalContext.current
+ LaunchedEffect(chat, entries, ready) {
+ if (!ready) return@LaunchedEffect
+ delay(3_000)
+ ReviewPrompt.viewed(context, chat, entries)
+ }
+}
+
+/**
+ * Back on the roster after reading an answer: once nothing has covered it for 2 s, Google Play's review prompt
+ * ([blocked]: a chat, a sheet, an error, a computer that isn't settled cancels it).
+ */
+@Composable internal fun ReviewInvitationEffect(blocked: Boolean) {
+ val context = LocalContext.current
+ val token by ReviewPrompt.opportunity.collectAsState()
+ LaunchedEffect(token, blocked) {
+ val opportunity = token ?: return@LaunchedEffect
+ if (blocked) { ReviewPrompt.cancel(context, ReviewCancellation.Unavailable); return@LaunchedEffect }
+ delay(2_000)
+ val activity = context as? Activity ?: return@LaunchedEffect ReviewPrompt.cancel(context, ReviewCancellation.Unavailable)
+ if (!ReviewPrompt.request(context, opportunity)) return@LaunchedEffect
+ try {
+ val manager = ReviewManagerFactory.create(context)
+ manager.launchReview(activity, manager.requestReview())
+ } catch (cancelled: CancellationException) { throw cancelled }
+ catch (error: Exception) { android.util.Log.i("Codync", "Review prompt unavailable: ${error.message}") }
+ }
+}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.kt b/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.kt
index 7024902b..c09058d8 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.kt
@@ -70,6 +70,13 @@ import com.codync.android.design.*
}
}
CardSection {
+ row {
+ LinkButton("Rate on Google Play") {
+ Analytics.capture(AnalyticsEvent.ReviewLinkOpened)
+ uri.openUri(PLAY_LISTING)
+ }
+ }
+ row { LinkButton("Report an issue") { uri.open("https://github.com/leepokai/Codync/issues", OutboundLink.Issues) } }
row { ValueRow("App version", BuildConfig.VERSION_NAME) }
row { LinkButton("Source code") { uri.open("https://github.com/leepokai/Codync", OutboundLink.Github) } }
}
@@ -90,6 +97,9 @@ import com.codync.android.design.*
}
}
+/** The app's Google Play page (the production app's, which testers and the public both have). */
+internal const val PLAY_LISTING = "https://play.google.com/store/apps/details?id=com.pokai.Codync.android"
+
/** Whether Android lets Codync show notifications at all; each computer's push switch is on its card. */
@Composable internal fun NotificationsSection() {
val context = LocalContext.current
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/StateScreen.kt b/apps/android/app/src/main/kotlin/com/codync/android/StateScreen.kt
index 4784a0ae..2783b5b3 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/StateScreen.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/StateScreen.kt
@@ -35,6 +35,7 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.DisposableEffect
+import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
@@ -118,7 +119,11 @@ internal fun openNotificationSettings(context: Context) = context.startActivity(
/** The State tab's Widget page: the installed widgets and these previews share their layouts. */
@Composable private fun WidgetGallery(app: AccountContext, usage: JsonObject?, accounts: AccountStore?, active: Boolean, keepInView: () -> Unit) {
val context = LocalContext.current
- val installed = rememberOnResume { runCatching { CodyncWidgets.installed(context) }.getOrNull() }
+ val resumed = rememberOnResume { runCatching { CodyncWidgets.installed(context) }.getOrNull() }
+ // "Check again" reads them now; coming back to the app reads them anew too.
+ var checkedAgain by remember { mutableStateOf<Int?>(null) }
+ LaunchedEffect(resumed) { checkedAgain = null }
+ val installed = checkedAgain ?: resumed
var asked by remember { mutableIntStateOf(0) }
val allowed = rememberOnResume { notificationsAllowed(context) } || asked > 0 && notificationsAllowed(context)
val permission = rememberLauncherForActivityResult(ActivityResultContracts.RequestPermission()) { granted ->
@@ -155,8 +160,10 @@ internal fun openNotificationSettings(context: Context) = context.startActivity(
else openNotificationSettings(context)
}))
}
- Text(if (installed == null) "Couldn't check your widgets. You can still add one below." else "Steps check themselves as you finish them.",
- style = Type.caption2, color = Palette.tertiary)
+ if (installed == null) Column(verticalArrangement = Arrangement.spacedBy(6.dp)) {
+ Text("Couldn't check your widgets. You can still add one using the steps below.", style = Type.caption, color = Palette.secondary)
+ SecondaryButton("Check again") { checkedAgain = runCatching { CodyncWidgets.installed(context) }.getOrNull() }
+ } else Text("Steps check themselves as you finish them.", style = Type.caption2, color = Palette.tertiary)
}
Column(verticalArrangement = Arrangement.spacedBy(14.dp)) {
@@ -196,7 +203,7 @@ internal fun openNotificationSettings(context: Context) = context.startActivity(
Text(when (kind) {
"usage" -> "Small shows the tightest limit. Medium shows two windows. Large adds a summary and up to four limits."
"limits" -> "Every provider's limits in one widget. The tightest leads; small shows two more and medium up to four."
- "team" -> "Four bots as characters with a dot for each one at work; the bots that need you come first."
+ "team" -> "Four bots as characters with a dot for each one at work. Touch and hold the widget, then Edit Widget to choose who sits in each spot; empty spots show the bots that need you first."
else -> "See who needs you and who's still working. Large shows up to six bots."
}, style = Type.caption, color = Palette.secondary)
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/UpdateNeededCard.kt b/apps/android/app/src/main/kotlin/com/codync/android/UpdateNeededCard.kt
index 7cdaca07..835cf79a 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/UpdateNeededCard.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/UpdateNeededCard.kt
@@ -17,6 +17,8 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.runtime.collectAsState
import com.codync.android.core.AppVersion
import com.codync.android.core.VersionMismatch
import com.codync.android.design.*
@@ -55,8 +57,16 @@ internal val AppState.mismatch: VersionMismatch? get() {
is VersionMismatch.UpdateHost -> "Update Codync on $host"
}, style = Type.subheadline.semibold, color = Palette.text)
when (mismatch) {
- is VersionMismatch.UpdateApp -> Text("${state.hello?.text("version")?.let { "$host runs Codync $it and" } ?: host} needs this app to be " +
- "${mismatch.minimum} or newer. Your chats are safe on the computer.", style = Type.footnote, color = Palette.secondary)
+ is VersionMismatch.UpdateApp -> {
+ val context = LocalContext.current
+ val store by AppUpdates.store.collectAsState()
+ // Google Play doesn't have the version this computer needs yet (an unknown version keeps the button: the page says).
+ val inReview = store?.let { AppVersion.isBelow(it, mismatch.minimum) } == true
+ Text("${state.hello?.text("version")?.let { "$host runs Codync $it and" } ?: host} needs this app to be " +
+ "${mismatch.minimum} or newer. Your chats are safe on the computer." +
+ if (inReview) " That version is still in Google Play review; it'll be there soon." else "", style = Type.footnote, color = Palette.secondary)
+ PrimaryButton("Update Codync", Modifier.padding(top = 4.dp), enabled = !inReview) { AppUpdates.open(context) }
+ }
is VersionMismatch.UpdateHost -> {
val notice = hostUpdateNotice(host, mismatch, state.hello?.text("os"), state.canUpdateHost, state.hostUpdate, now)
Text(notice.detail, style = Type.footnote, color = Palette.secondary)
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/VoiceService.kt b/apps/android/app/src/main/kotlin/com/codync/android/VoiceService.kt
index a2793c2f..58a200da 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/VoiceService.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/VoiceService.kt
@@ -129,16 +129,25 @@ class VoiceService : Service() {
.setAction(Intent.ACTION_VIEW).setData(url), PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
fun action(kind: String) = PendingIntent.getService(this, kind.hashCode(), Intent(this, VoiceService::class.java)
.setAction(kind).putExtra(ID, callId), PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
+ // An ongoing call, as Android draws one (iOS: the call's Live Activity): the bot's face and name, the call's length
+ // counting up, hang up and mute here, and the status bar's call chip while it lasts.
+ val face = bot?.let {
+ com.codync.android.design.customAvatarBitmap(it.customIcon?.dataUrl, it.customIcon?.tinted == true, 128,
+ com.codync.android.design.AvatarPalette.colors[it.avatarColor]?.toInt() ?: 0xFF1084FE.toInt())
+ ?: com.codync.android.design.characterAvatarBitmap(it.avatarShape, it.avatarColor, 128, 0xFF141414.toInt())
+ }
+ val caller = androidx.core.app.Person.Builder().setName(bot?.name ?: "Codync").setImportant(true)
+ .apply { face?.let { setIcon(androidx.core.graphics.drawable.IconCompat.createWithBitmap(it)) } }.build()
return NotificationCompat.Builder(this, CHANNEL).setSmallIcon(R.drawable.ic_notification)
- .setContentTitle("Voice chat · ${bot?.name ?: "Codync"}")
+ .setContentTitle(bot?.name ?: "Codync")
.setContentText(callNotificationText(state, progress))
- .setStyle(NotificationCompat.BigTextStyle().bigText(callNotificationText(state, progress, "\n")))
+ .setStyle(NotificationCompat.CallStyle.forOngoingCall(caller, action(END)))
// The call's length counts up beside the bot's name.
.setUsesChronometer(true).setShowWhen(true)
.setWhen(callStartedWallClock(session?.startedAt, SystemClock.elapsedRealtime(), System.currentTimeMillis()))
.setContentIntent(content).setOngoing(true).setCategory(NotificationCompat.CATEGORY_CALL)
.setVisibility(NotificationCompat.VISIBILITY_PRIVATE).setOnlyAlertOnce(true)
- .addAction(0, if (state.muted) "Unmute" else "Mute", action(MUTE)).addAction(0, "End call", action(END)).build()
+ .addAction(0, if (state.muted) "Unmute" else "Mute", action(MUTE)).build()
}
private fun end(error: String?) {
if (ending) return
diff --git a/apps/android/app/src/main/res/values/widget.xml b/apps/android/app/src/main/res/values/widget.xml
index 36442558..c3014802 100644
--- a/apps/android/app/src/main/res/values/widget.xml
+++ b/apps/android/app/src/main/res/values/widget.xml
@@ -4,6 +4,8 @@
<string name="widget_bots_description">Latest bot status and unread counts</string>
<string name="widget_team_description">Four bots as characters, the ones that need you first</string>
<string name="widget_provider_description">Latest limits from your selected provider</string>
+ <string name="widget_claude_description">Claude Code session and weekly usage limits.</string>
+ <string name="widget_codex_description">Codex session and weekly usage limits.</string>
<string name="widget_usage_description">Subscription limits your computer reports, for every provider</string>
<color name="widget_background">#F8F8F8</color>
<color name="widget_foreground">#111111</color>
diff --git a/apps/android/app/src/main/res/xml/widget_claude.xml b/apps/android/app/src/main/res/xml/widget_claude.xml
new file mode 100644
index 00000000..3b29c18d
--- /dev/null
+++ b/apps/android/app/src/main/res/xml/widget_claude.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
+ android:minWidth="110dp" android:minHeight="110dp" android:minResizeWidth="110dp" android:minResizeHeight="110dp"
+ android:targetCellWidth="2" android:targetCellHeight="2" android:resizeMode="horizontal|vertical"
+ android:updatePeriodMillis="1800000" android:initialLayout="@layout/widget_loading"
+ android:description="@string/widget_claude_description" android:previewLayout="@layout/widget_loading"
+ android:widgetCategory="home_screen" />
diff --git a/apps/android/app/src/main/res/xml/widget_codex.xml b/apps/android/app/src/main/res/xml/widget_codex.xml
new file mode 100644
index 00000000..661e91b5
--- /dev/null
+++ b/apps/android/app/src/main/res/xml/widget_codex.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
+ android:minWidth="110dp" android:minHeight="110dp" android:minResizeWidth="110dp" android:minResizeHeight="110dp"
+ android:targetCellWidth="2" android:targetCellHeight="2" android:resizeMode="horizontal|vertical"
+ android:updatePeriodMillis="1800000" android:initialLayout="@layout/widget_loading"
+ android:description="@string/widget_codex_description" android:previewLayout="@layout/widget_loading"
+ android:widgetCategory="home_screen" />
diff --git a/apps/android/core/src/main/kotlin/com/codync/android/core/Compatibility.kt b/apps/android/core/src/main/kotlin/com/codync/android/core/Compatibility.kt
index ee659c61..86997208 100644
--- a/apps/android/core/src/main/kotlin/com/codync/android/core/Compatibility.kt
+++ b/apps/android/core/src/main/kotlin/com/codync/android/core/Compatibility.kt
@@ -39,3 +39,12 @@ object AppVersion {
private fun parse(version: String): List<Int>? = version.substringBefore('-').split('.').map { it.toIntOrNull() ?: return null }
}
+
+/** A newer release of this app to remind about (iOS `UpdateReminder.app`): the store has one, and it wasn't dismissed. */
+object UpdateReminder {
+ fun app(current: String, store: String?, dismissed: String?): String? =
+ store?.takeIf { AppVersion.isBelow(current, it) && it != dismissed }
+
+ /** A Google Play version code as its version (`major * 1_000_000 + minor * 1_000 + patch`, app/build.gradle.kts). */
+ fun versionOf(code: Long): String = "${code / 1_000_000}.${code / 1_000 % 1_000}.${code % 1_000}"
+}
diff --git a/apps/android/core/src/main/kotlin/com/codync/android/core/Review.kt b/apps/android/core/src/main/kotlin/com/codync/android/core/Review.kt
new file mode 100644
index 00000000..74dd58b3
--- /dev/null
+++ b/apps/android/core/src/main/kotlin/com/codync/android/core/Review.kt
@@ -0,0 +1,143 @@
+package com.codync.android.core
+
+import java.time.Instant
+import java.time.ZoneId
+import kotlinx.serialization.Serializable
+import kotlinx.serialization.json.booleanOrNull
+import kotlinx.serialization.json.jsonPrimitive
+
+// When to invite a rating (iOS `ReviewHistory`, `ReviewCompletion`, `ReviewInvitation`): after the person has used the
+// app for a while and just read a finished answer to their own message. Device-local; requests are attempts, never
+// evidence of a rating. Times are epoch milliseconds.
+
+private const val DAY = 86_400_000L
+
+/** The device-local policy's memory, saved as JSON. */
+@Serializable data class ReviewHistory(
+ val firstUse: Long,
+ val activeDays: Set<String> = emptySet(),
+ val completed: Int = 0,
+ val requests: List<Request> = emptyList(),
+ val requestedVersions: Set<String> = emptySet(),
+ /** Messages this phone sent (by client nonce) and when, waiting for their answer. */
+ val sent: Map<String, Long> = emptyMap(),
+) {
+ @Serializable data class Request(val date: Long, val version: String, val completed: Int)
+
+ fun recordingActivity(now: Long, zone: ZoneId = ZoneId.systemDefault()): ReviewHistory {
+ val day = Instant.ofEpochMilli(now).atZone(zone).toLocalDate()
+ val days = activeDays + "${day.year}-${day.monthValue}-${day.dayOfMonth}"
+ // Only the three-day milestone matters; keep a bounded set after reaching it.
+ return copy(activeDays = if (days.size > 3) days.sorted().takeLast(3).toSet() else days)
+ }
+
+ /** A week since first use, three active days, five finished answers, once per version, twice a year, 120 days apart. */
+ fun eligible(now: Long, version: String): Boolean {
+ if (now - firstUse < 7 * DAY || activeDays.size < 3 || completed < 5 || version in requestedVersions ||
+ requests.count { now - it.date < 365 * DAY } >= 2) return false
+ val last = requests.lastOrNull() ?: return true
+ return now - last.date >= 120 * DAY && completed - last.completed >= 5
+ }
+
+ fun recordingRequest(now: Long, version: String): ReviewHistory = copy(requestedVersions = requestedVersions + version,
+ requests = requests.filter { now - it.date < 365 * DAY } + Request(now, version, completed))
+
+ fun pruned(now: Long): ReviewHistory = copy(sent = sent.filterValues { now - it < 30 * DAY })
+}
+
+/** Which of this phone's messages a just-read final answer finished; only the host's turn and final flags count, never content. */
+object ReviewCompletion {
+ fun match(entries: List<Entry>, sent: Map<String, Long>, now: Long): List<String>? {
+ val chat = entries.filter { it.isChat && "call" !in it.data }
+ val final = chat.lastOrNull() ?: return null
+ if (final.kind != "agent" || final.data["final"]?.jsonPrimitive?.booleanOrNull != true || final.turn <= 0) return null
+ val turn = entries.filter { it.turn == final.turn }
+ // Non-successful completions and stops produce notices; be conservative about all notices.
+ if (turn.any { it.kind == "notice" || it.status == "failed" || it.status == "cancelled" }) return null
+ val nonces = turn.mapNotNull { entry ->
+ val nonce = entry.clientNonce ?: return@mapNotNull null
+ val at = sent[nonce] ?: return@mapNotNull null
+ nonce.takeIf { entry.kind == "user" && entry.status == "sent" && "call" !in entry.data && "routineId" !in entry.data &&
+ "from" !in entry.data && now - at < 30 * DAY }
+ }
+ return nonces.ifEmpty { null }
+ }
+}
+
+/** Why an opportunity to invite a rating went away. */
+enum class ReviewCancellation(val wire: String) { Background("background"), Interaction("interaction"), Unavailable("unavailable") }
+
+/**
+ * The invitation's state (iOS `ReviewInvitation`): a send, a finished answer read in its chat, then returning to the
+ * roster makes an opportunity; the roster asks the store once it has stayed clear. [save] keeps the history, [events]
+ * reports what happened (the analytics events).
+ */
+class ReviewInvitation(initial: ReviewHistory, private val save: (ReviewHistory) -> Unit, private val events: (Event) -> Unit) {
+ sealed interface Event {
+ data class Opportunity(val completed: Int) : Event
+ data class Cancelled(val reason: ReviewCancellation) : Event
+ data class Requested(val completed: Int) : Event
+ }
+
+ var history: ReviewHistory = initial; private set
+ private var activeSince: Long? = null
+ private var viewedChat: String? = null
+ /** The current opportunity's token; the roster waits on it. */
+ var opportunity: Long? = null; private set
+ private var tokens = 0L
+ private val interruptions = mutableSetOf<Any>()
+ val interrupted: Boolean get() = interruptions.isNotEmpty()
+
+ fun interrupt(token: Any, active: Boolean) {
+ if (active) { interruptions += token; cancel(ReviewCancellation.Unavailable) } else interruptions -= token
+ }
+
+ fun setActive(active: Boolean, now: Long) {
+ if (active) { history = history.pruned(now); save(history); if (activeSince == null) activeSince = now }
+ else { activeSince = null; viewedChat = null; cancel(ReviewCancellation.Background) }
+ }
+
+ fun sent(nonce: String, now: Long) {
+ var next = history.pruned(now)
+ if (next.sent.size >= 100) next.sent.minByOrNull { it.value }?.let { oldest -> next = next.copy(sent = next.sent - oldest.key) }
+ history = next.copy(sent = next.sent + (nonce to now)).recordingActivity(now)
+ viewedChat = null
+ cancel(ReviewCancellation.Interaction)
+ save(history)
+ }
+
+ /** An unobscured final answer at the bottom of [chat] stayed in sight. */
+ fun viewed(chat: String, entries: List<Entry>, now: Long) {
+ if (activeSince == null || interrupted) return
+ val done = ReviewCompletion.match(entries, history.sent, now) ?: return
+ history = history.copy(sent = history.sent - done.toSet(), completed = history.completed + 1).recordingActivity(now)
+ viewedChat = chat
+ save(history)
+ }
+
+ fun returned(from: String, version: String, now: Long) {
+ val since = activeSince
+ val viewed = viewedChat
+ viewedChat = null
+ if (interrupted || viewed != from || since == null || now - since < 60_000 || !history.eligible(now, version)) return
+ opportunity = ++tokens
+ events(Event.Opportunity(history.completed))
+ }
+
+ fun cancel(reason: ReviewCancellation) {
+ if (opportunity == null) return
+ opportunity = null
+ events(Event.Cancelled(reason))
+ }
+
+ /** Saved before the store is asked: a request it doesn't show still uses up this app's own cooldown. */
+ fun request(token: Long, version: String, now: Long): Boolean {
+ val since = activeSince ?: return false
+ if (interrupted || opportunity != token || now - since < 60_000 || !history.eligible(now, version)) return false
+ opportunity = null
+ history = history.recordingRequest(now, version)
+ save(history)
+ events(Event.Requested(history.completed))
+ return true
+ }
+}
diff --git a/apps/android/core/src/test/kotlin/com/codync/android/core/ReviewTest.kt b/apps/android/core/src/test/kotlin/com/codync/android/core/ReviewTest.kt
new file mode 100644
index 00000000..98714f7b
--- /dev/null
+++ b/apps/android/core/src/test/kotlin/com/codync/android/core/ReviewTest.kt
@@ -0,0 +1,68 @@
+package com.codync.android.core
+
+import kotlinx.serialization.json.buildJsonObject
+import kotlinx.serialization.json.put
+import org.junit.Assert.*
+import org.junit.Test
+
+class ReviewTest {
+ private val day = 86_400_000L
+
+ private fun user(nonce: String, turn: Long) = Entry("u$turn", turn, "b", turn, "user", turn,
+ buildJsonObject { put("text", "do it"); put("clientNonce", nonce); put("status", "sent") })
+ private fun answer(turn: Long) = Entry("a$turn", turn, "b", turn, "agent", turn, buildJsonObject { put("text", "done"); put("final", true) })
+
+ @Test fun `only a final answer to this phone's own message finishes it`() {
+ val sent = mapOf("n1" to 0L)
+ assertEquals(listOf("n1"), ReviewCompletion.match(listOf(user("n1", 1), answer(1)), sent, day))
+ // Still working, or a notice in the turn (a stop, a failure).
+ assertNull(ReviewCompletion.match(listOf(user("n1", 1)), sent, day))
+ val notice = Entry("x", 2, "b", 2, "notice", 1, buildJsonObject { put("text", "Stopped.") })
+ assertNull(ReviewCompletion.match(listOf(user("n1", 1), notice, answer(1)), sent, day))
+ // Another device's message, or one sent over a month ago.
+ assertNull(ReviewCompletion.match(listOf(user("n2", 1), answer(1)), sent, day))
+ assertNull(ReviewCompletion.match(listOf(user("n1", 1), answer(1)), sent, 31 * day))
+ }
+
+ @Test fun `eligible after a week, three active days and five answers, once per version`() {
+ var history = ReviewHistory(firstUse = 0, completed = 5)
+ for (d in 0 until 3) history = history.recordingActivity(d * day + 1, java.time.ZoneOffset.UTC)
+ assertFalse(history.eligible(6 * day, "2.34.0"))
+ assertTrue(history.eligible(7 * day, "2.34.0"))
+ history = history.recordingRequest(7 * day, "2.34.0")
+ assertFalse(history.eligible(200 * day, "2.34.0"))
+ // Another version needs 120 days and five more answers.
+ assertFalse(history.eligible(100 * day, "2.35.0"))
+ assertTrue(history.copy(completed = 10).eligible(130 * day, "2.35.0"))
+ }
+
+ @Test fun `returning from the chat whose answer was read makes one opportunity, and asking uses it`() {
+ val events = mutableListOf<ReviewInvitation.Event>()
+ var history = ReviewHistory(firstUse = 0, completed = 4, activeDays = setOf("a", "b", "c"))
+ val invitation = ReviewInvitation(history, { history = it }) { events += it }
+ val now = 10 * day
+ invitation.setActive(true, now)
+ invitation.sent("n1", now)
+ invitation.viewed("chat", listOf(user("n1", 1), answer(1)), now + 1_000)
+ invitation.returned("other", "2.34.0", now + 120_000)
+ assertNull(invitation.opportunity)
+ invitation.viewed("chat", listOf(user("n1", 1), answer(1)), now + 1_000)
+ invitation.sent("n2", now + 2_000)
+ invitation.viewed("chat", listOf(user("n2", 2), answer(2)), now + 3_000)
+ invitation.returned("chat", "2.34.0", now + 120_000)
+ val token = requireNotNull(invitation.opportunity)
+ assertTrue(invitation.request(token, "2.34.0", now + 122_000))
+ assertFalse(invitation.request(token, "2.34.0", now + 123_000))
+ assertEquals(listOf(ReviewInvitation.Event.Opportunity(6), ReviewInvitation.Event.Requested(6)), events)
+ assertEquals(setOf("2.34.0"), history.requestedVersions)
+ }
+
+ @Test fun `play version codes read back as versions and a newer one is reminded until dismissed`() {
+ assertEquals("2.34.0", UpdateReminder.versionOf(2_034_000))
+ assertEquals("2.34.12", UpdateReminder.versionOf(2_034_012))
+ assertEquals("2.35.0", UpdateReminder.app("2.34.0", "2.35.0", null))
+ assertNull(UpdateReminder.app("2.34.0", "2.35.0", "2.35.0"))
+ assertNull(UpdateReminder.app("2.35.0", "2.35.0", null))
+ assertNull(UpdateReminder.app("2.34.0", null, null))
+ }
+}
diff --git a/apps/android/design/src/main/kotlin/com/codync/android/design/L10n.kt b/apps/android/design/src/main/kotlin/com/codync/android/design/L10n.kt
index 8ae7a61d..e2e522b7 100644
--- a/apps/android/design/src/main/kotlin/com/codync/android/design/L10n.kt
+++ b/apps/android/design/src/main/kotlin/com/codync/android/design/L10n.kt
@@ -15,7 +15,8 @@ fun systemScript(tag: String): ChineseScript? {
/** The language of this app's own interface. Chats and bots are not translated. `Zh` stays stored as "zh". */
enum class AppLanguage(val stored: String, val title: String) {
- System("system", "Follow system"), En("en", "English"), Zh("zh", "简体中文"), ZhHant("zh-Hant", "繁體中文"),
+ // The menu's order, as on the iPhone: Chinese first, then English and the rest.
+ System("system", "Follow system"), Zh("zh", "简体中文"), ZhHant("zh-Hant", "繁體中文"), En("en", "English"),
Ja("ja", "日本語"), Ko("ko", "한국어"), Fr("fr", "Français"), De("de", "Deutsch"), Es("es", "Español");
fun resolved(systemTag: String): AppLanguage {
diff --git a/apps/android/gradle/libs.versions.toml b/apps/android/gradle/libs.versions.toml
index 8c290a16..38eef972 100644
--- a/apps/android/gradle/libs.versions.toml
+++ b/apps/android/gradle/libs.versions.toml
@@ -26,8 +26,12 @@ glance = "1.2.0"
backdrop = "2.0.1"
kyant-shapes = "1.2.1"
webrtc = "125.6422.07"
+play-app-update = "2.1.0"
+play-review = "2.0.2"
[libraries]
+play-app-update = { module = "com.google.android.play:app-update-ktx", version.ref = "play-app-update" }
+play-review = { module = "com.google.android.play:review-ktx", version.ref = "play-review" }
compose-bom = { module = "androidx.compose:compose-bom", version.ref = "compose" }
compose-ui = { module = "androidx.compose.ui:ui" }
compose-foundation = { module = "androidx.compose.foundation:foundation" }
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json
index a32898c5..a58d20f6 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json
@@ -1445,5 +1445,6 @@
"Enter folder path": "Enter folder path",
"Folder path": "Folder path",
"Paste an absolute path": "Paste an absolute path",
- "Go to folder": "Go to folder"
+ "Go to folder": "Go to folder",
+ "Rate on Google Play": "Bei Google Play bewerten"
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json
index 67e34832..785c6adc 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json
@@ -1445,5 +1445,6 @@
"Enter folder path": "Enter folder path",
"Folder path": "Folder path",
"Paste an absolute path": "Paste an absolute path",
- "Go to folder": "Go to folder"
+ "Go to folder": "Go to folder",
+ "Rate on Google Play": "Valorar en Google Play"
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json
index 28e36d8e..c9787050 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json
@@ -1445,5 +1445,6 @@
"Enter folder path": "Enter folder path",
"Folder path": "Folder path",
"Paste an absolute path": "Paste an absolute path",
- "Go to folder": "Go to folder"
+ "Go to folder": "Go to folder",
+ "Rate on Google Play": "Noter sur Google Play"
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json
index eae4f1cd..a6e42556 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json
@@ -1445,5 +1445,6 @@
"Enter folder path": "Enter folder path",
"Folder path": "Folder path",
"Paste an absolute path": "Paste an absolute path",
- "Go to folder": "Go to folder"
+ "Go to folder": "Go to folder",
+ "Rate on Google Play": "Google Play で評価"
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json
index aa00393b..aa74aa07 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json
@@ -1445,5 +1445,6 @@
"Enter folder path": "Enter folder path",
"Folder path": "Folder path",
"Paste an absolute path": "Paste an absolute path",
- "Go to folder": "Go to folder"
+ "Go to folder": "Go to folder",
+ "Rate on Google Play": "Google Play에서 평가하기"
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json
index f8b29ec4..c89d323f 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json
@@ -1445,5 +1445,6 @@
"Enter folder path": "Enter folder path",
"Folder path": "Folder path",
"Paste an absolute path": "Paste an absolute path",
- "Go to folder": "Go to folder"
+ "Go to folder": "Go to folder",
+ "Rate on Google Play": "在 Google Play 评分"
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json
index eb65595c..af2b05f7 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json
@@ -1445,5 +1445,6 @@
"PNG, JPEG, WebP up to 5 MiB; SVG up to 256 KiB.": "PNG、JPEG、WebP 最大 5 MiB;SVG 最大 256 KiB。",
"Saved immediately. Custom images stay still.": "立即儲存。自訂圖片維持靜態。",
"Sign in required": "需要登入",
- "Sign in to use custom images.": "使用自訂圖片需要登入帳號。"
+ "Sign in to use custom images.": "使用自訂圖片需要登入帳號。",
+ "Rate on Google Play": "在 Google Play 評分"
}