Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
0386b5a
Skip unparseable notifications instead of failing the whole sync [AI]
ctsims Oct 5, 2026
3474126
Store rich message fields and attachments (Connect DB v30) [AI]
ctsims Oct 5, 2026
db49751
Read rich message fields and attachments from the messaging sync [AI]
ctsims Oct 5, 2026
d4caf3e
Download and decrypt messaging attachments in the background [AI]
ctsims Oct 5, 2026
d48153c
Show message attachments in the chat [AI]
ctsims Oct 5, 2026
0cee05d
Remove unused attachment helpers and wrap long test lines [AI]
ctsims Oct 5, 2026
a580013
Document rich messaging data flow and attachment design [AI]
ctsims Oct 5, 2026
6a3f997
Add a messaging setting for automatic attachment downloads [AI]
ctsims Oct 5, 2026
d4c0786
Document the automatic attachment download setting [AI]
ctsims Oct 5, 2026
d74b82b
Keep rich messages hidden until all their attachments are downloaded …
ctsims Oct 5, 2026
b65eb5d
Document message-level download visibility [AI]
ctsims Oct 5, 2026
95e1372
Show attachment download failures immediately instead of spinning thr…
ctsims Oct 5, 2026
de9aa32
Document immediate download failure and retry behaviour [AI]
ctsims Oct 5, 2026
356b446
Preview rich messages by their rich text [AI]
ctsims Oct 5, 2026
40ab9b8
Document that rich text always takes precedence over content [AI]
ctsims Oct 5, 2026
e11166d
Leave messages from newer protocol versions unacknowledged behind a p…
ctsims Oct 5, 2026
8d059bf
Remove the unused inline update notice from the rich message row [AI]
ctsims Oct 5, 2026
71cd328
Document how messages from unsupported versions are handled [AI]
ctsims Oct 5, 2026
10100d5
Reword the unsupported message placeholder and show the update banner…
ctsims Oct 5, 2026
b7a42de
Document the reworded placeholder and banner color [AI]
ctsims Oct 5, 2026
1fb741e
Show media-only messages without an empty text line [AI]
ctsims Oct 5, 2026
23039be
Document blank rich text for media-only messages [AI]
ctsims Oct 5, 2026
490bf9f
Treat an empty rich_text string as a media-only message [AI]
ctsims Oct 5, 2026
a5cfb1b
Document the empty rich_text envelope for media-only messages [AI]
ctsims Oct 5, 2026
0dc5c52
Drop legacy content when a message carries rich text [AI]
ctsims Oct 5, 2026
8e642f6
Document that content is not stored alongside rich text [AI]
ctsims Oct 5, 2026
1639bcd
Merge branch 'master' of https://github.com/dimagi/commcare-android i…
ctsims Oct 5, 2026
81f66dc
Apply ktlint formatting to new messaging files [AI]
ctsims Oct 5, 2026
8267f9b
test session management
ctsims Oct 6, 2026
308fdb7
Merge branch 'master' of https://github.com/dimagi/commcare-android i…
ctsims Oct 13, 2026
db369ba
Scope chat attachment lookups to the message's channel [AI]
ctsims Oct 13, 2026
e13856c
Fail the whole notification sync on a parse error again [AI]
ctsims Oct 13, 2026
47238c1
Fail the sync instead of crashing on attachments without a stored mes…
ctsims Oct 13, 2026
d41ddf6
Create the attachment table inside the v30 upgrade transaction [AI]
ctsims Oct 13, 2026
babc716
Define supported message versions in one place [AI]
ctsims Oct 13, 2026
d1a0f76
Base attachment text styles on the Connect design system [AI]
ctsims Oct 13, 2026
1a81c3b
Document that parse and storage errors fail the whole sync [AI]
ctsims Oct 13, 2026
b49f70d
Size images by their EXIF orientation [AI]
ctsims Oct 13, 2026
204a187
Stop portrait images and the keyboard from narrowing message bubbles …
ctsims Oct 13, 2026
cc67f37
Document the revised image and text sizing [AI]
ctsims Oct 13, 2026
7378aa9
Size media from the list's width while it is first being measured [AI]
ctsims Oct 13, 2026
c42c06c
Center media above captions that are wider than it [AI]
ctsims Oct 13, 2026
038cf3a
Document centered media above wider captions [AI]
ctsims Oct 13, 2026
a5b16ca
Add an image lightbox and show chat images at their natural size [AI]
ctsims Oct 13, 2026
77152da
Document the image lightbox and natural-size sizing [AI]
ctsims Oct 13, 2026
4dea2bc
Animate the image lightbox from and back to the tapped image [AI]
ctsims Oct 13, 2026
fe42e85
Document the lightbox open and close animation [AI]
ctsims Oct 13, 2026
ec27c03
Settle lightbox tests on a fixed clock advance [AI]
ctsims Oct 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ dependencies {
implementation('com.github.bumptech.glide:glide:4.9.0') {
exclude group: 'com.android.support'
}
implementation 'com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
Expand Down
4 changes: 4 additions & 0 deletions app/res/color/connect_message_audio_track_inactive.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:alpha="0.4" android:color="@color/white" />
</selector>
6 changes: 6 additions & 0 deletions app/res/drawable/connect_message_pending_tile_bg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/connect_blue_color" />
<corners android:radius="@dimen/connect_message_media_corner_radius" />
</shape>
5 changes: 5 additions & 0 deletions app/res/drawable/connect_message_white_circle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/white" />
</shape>
9 changes: 9 additions & 0 deletions app/res/drawable/ic_connect_message_download.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/white"
android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z" />
</vector>
9 changes: 9 additions & 0 deletions app/res/drawable/ic_connect_message_file.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/white"
android:pathData="M6,2c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2L18,22c1.1,0 2,-0.9 2,-2L20,8l-6,-6L6,2zM13,9L13,3.5L18.5,9L13,9z" />
</vector>
9 changes: 9 additions & 0 deletions app/res/drawable/ic_connect_message_pause.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/white"
android:pathData="M6,19h4L10,5L6,5v14zM14,5v14h4L18,5h-4z" />
</vector>
9 changes: 9 additions & 0 deletions app/res/drawable/ic_connect_message_play.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/white"
android:pathData="M8,5v14l11,-7z" />
</vector>
9 changes: 9 additions & 0 deletions app/res/drawable/ic_connect_message_retry.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/white"
android:pathData="M17.65,6.35C16.2,4.9 14.21,4 12,4c-4.42,0 -7.99,3.58 -7.99,8s3.57,8 7.99,8c3.73,0 6.84,-2.55 7.73,-6h-2.08c-0.82,2.33 -3.04,4 -5.65,4 -3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6c1.66,0 3.14,0.69 4.22,1.78L13,11h7V4l-2.35,2.35z" />
</vector>
19 changes: 18 additions & 1 deletion app/res/layout/fragment_connect_message.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,28 @@
android:overScrollMode="never"
android:paddingBottom="10dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@+id/cardMessage"
app:layout_constraintBottom_toTopOf="@+id/tvUpdateBanner"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tvUpdateBanner"
style="@style/ConnectMessageAttachmentText.Label"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/connect_space_sm"
android:layout_marginBottom="@dimen/connect_space_sm"
android:background="@drawable/error_banner_bg"
android:padding="@dimen/connect_space_md"
android:text="@string/connect_messaging_update_app_banner"
android:textColor="@color/dark_red_brick_red"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/cardMessage"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:visibility="visible" />

<RelativeLayout
android:id="@+id/cardMessage"
android:layout_width="0dp"
Expand Down
42 changes: 42 additions & 0 deletions app/res/layout/fragment_connect_message_image_viewer.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.commcare.fragments.connectMessaging.ConnectMessageImageViewerFragment">

<View
android:id="@+id/vBackdrop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black" />

<com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
android:id="@+id/ivImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0" />

<ImageView
android:id="@+id/ivTransitionImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:importantForAccessibility="no"
android:scaleType="fitXY" />

<TextView
android:id="@+id/tvCaption"
style="@style/TextStyle.Connect.BodyM"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@color/black_60"
android:ellipsize="end"
android:maxLines="3"
android:padding="@dimen/connect_space_md"
android:textColor="@color/white"
android:visibility="gone"
tools:text="Coaching notes from today's visit"
tools:visibility="visible" />
</FrameLayout>
66 changes: 66 additions & 0 deletions app/res/layout/fragment_connect_messaging_settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context="org.commcare.fragments.connectMessaging.ConnectMessagingSettingsFragment">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/connect_space_lg">

<TextView
android:id="@+id/tvAutoDownloadTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:text="@string/connect_messaging_settings_auto_download_title"
android:textColor="@color/black"
android:textSize="@dimen/connect_text_title" />

<RadioGroup
android:id="@+id/rgAutoDownload"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/connect_space_sm">

<RadioButton
android:id="@+id/rbAnyNetwork"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/connect_touch_target_min"
android:text="@string/connect_messaging_settings_any_network"
android:textColor="@color/black"
android:textSize="@dimen/connect_text_body" />

<RadioButton
android:id="@+id/rbLargeOnWifiOnly"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/connect_touch_target_min"
android:text="@string/connect_messaging_settings_large_on_wifi_only"
android:textColor="@color/black"
android:textSize="@dimen/connect_text_body" />

<RadioButton
android:id="@+id/rbManualOnly"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/connect_touch_target_min"
android:text="@string/connect_messaging_settings_manual_only"
android:textColor="@color/black"
android:textSize="@dimen/connect_text_body" />
</RadioGroup>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/connect_space_sm"
android:text="@string/connect_messaging_settings_tap_note"
android:textColor="@color/sonic_silver"
android:textSize="@dimen/connect_text_caption" />
</LinearLayout>
</ScrollView>
72 changes: 72 additions & 0 deletions app/res/layout/item_chat_left_rich_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start">

<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/spacer_small"
android:layout_marginTop="@dimen/standard_spacer"
android:layout_marginBottom="@dimen/standard_spacer"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<ImageView
android:id="@+id/edge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@null"
android:src="@drawable/ic_connect_message_receiver_edge" />

<LinearLayout
android:id="@+id/llBubble"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/edge"
android:background="@drawable/shape_connect_message_receiver_bg"
android:orientation="vertical"
android:padding="@dimen/connect_message_bubble_padding">

<LinearLayout
android:id="@+id/llAttachments"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="@dimen/connect_space_sm"
android:orientation="vertical"
android:visibility="gone" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvChatMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="@dimen/connect_text_body"
tools:text="Some dummy text message from user A" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvChatDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="@dimen/connect_message_timestamp_spacing"
android:textColor="@color/white"
android:textSize="@dimen/connect_text_label"
tools:text="11:00 AM" />

</LinearLayout>
</RelativeLayout>

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.7" />
</androidx.constraintlayout.widget.ConstraintLayout>
47 changes: 47 additions & 0 deletions app/res/layout/view_connect_message_attachment_audio.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:orientation="horizontal"
tools:parentTag="android.widget.LinearLayout">

<FrameLayout
android:id="@+id/btnPlay"
android:layout_width="@dimen/connect_touch_target_min"
android:layout_height="@dimen/connect_touch_target_min"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/connect_messaging_audio_play">

<ImageView
android:id="@+id/ivPlayIcon"
style="@style/ConnectMessageAttachmentActionCircle"
android:layout_width="@dimen/connect_icon_circle_lg"
android:layout_height="@dimen/connect_icon_circle_lg"
android:layout_gravity="center"
android:contentDescription="@null"
android:src="@drawable/ic_connect_message_play" />
</FrameLayout>

<com.google.android.material.slider.Slider
android:id="@+id/slider"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:valueFrom="0"
android:valueTo="1"
app:haloRadius="0dp"
app:labelBehavior="gone"
app:thumbColor="@color/white"
app:thumbRadius="@dimen/connect_message_audio_thumb_radius"
app:trackColorActive="@color/white"
app:trackColorInactive="@color/connect_message_audio_track_inactive"
app:trackHeight="@dimen/connect_message_audio_track_height" />

<TextView
android:id="@+id/tvTime"
style="@style/ConnectMessageAttachmentText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFeatureSettings="tnum"
tools:text="1:24" />
</merge>
41 changes: 41 additions & 0 deletions app/res/layout/view_connect_message_attachment_file.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:gravity="center_vertical"
android:minHeight="@dimen/connect_touch_target_min"
android:orientation="horizontal">

<ImageView
style="@style/ConnectMessageAttachmentActionCircle"
android:layout_width="@dimen/connect_icon_circle_lg"
android:layout_height="@dimen/connect_icon_circle_lg"
android:contentDescription="@null"
android:src="@drawable/ic_connect_message_file" />

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/connect_space_md"
android:orientation="vertical">

<TextView
android:id="@+id/tvFileName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="middle"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="@dimen/connect_text_body"
tools:text="instructions.pdf" />

<TextView
android:id="@+id/tvFileSize"
style="@style/ConnectMessageAttachmentText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="403 kB" />
</LinearLayout>
</LinearLayout>
8 changes: 8 additions & 0 deletions app/res/layout/view_connect_message_attachment_image.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.imageview.ShapeableImageView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/connect_lighter_grey"
android:scaleType="centerCrop"
app:shapeAppearanceOverlay="@style/ConnectMessageMediaShapeAppearance" />
Loading
Loading