diff --git a/CHANGES.md b/CHANGES.md
index 8bdd42636d..e4e0ae9df0 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -5,7 +5,7 @@ Features ✨:
-
Improvements 🙌:
- -
+ - Improve notification accessibility with ticker text (#1226)
Bugfix 🐛:
- Sometimes the same device appears twice in the list of devices of a user (#1329)
diff --git a/gradle.properties b/gradle.properties
index 2e2b110f15..d9d9e57cbc 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -8,7 +8,7 @@
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.useAndroidX=true
-org.gradle.jvmargs=-Xmx1536m
+org.gradle.jvmargs=-Xmx8192m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
diff --git a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt
index ae8e7f23fc..6fc396b264 100644
--- a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt
+++ b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt
@@ -348,12 +348,19 @@ class NotificationDrawerManager @Inject constructor(private val context: Context
globalLastMessageTimestamp = lastMessageTimestamp
}
+ val tickerText = if (roomEventGroupInfo.isDirect) {
+ stringProvider.getString(R.string.notification_ticker_text_dm, events.last().senderName, events.last().description)
+ } else {
+ stringProvider.getString(R.string.notification_ticker_text_group, roomName, events.last().senderName, events.last().description)
+ }
+
val notification = notificationUtils.buildMessagesListNotification(
style,
roomEventGroupInfo,
largeBitmap,
lastMessageTimestamp,
- myUserDisplayName)
+ myUserDisplayName,
+ tickerText)
// is there an id for this room?
notificationUtils.showNotificationMessage(roomId, ROOM_MESSAGES_NOTIFICATION_ID, notification)
diff --git a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationUtils.kt b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationUtils.kt
index 50fb5b70de..178235ab5f 100755
--- a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationUtils.kt
+++ b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationUtils.kt
@@ -381,7 +381,8 @@ class NotificationUtils @Inject constructor(private val context: Context,
roomInfo: RoomEventGroupInfo,
largeIcon: Bitmap?,
lastMessageTimestamp: Long,
- senderDisplayNameForReplyCompat: String?): Notification {
+ senderDisplayNameForReplyCompat: String?,
+ tickerText: String): Notification {
val accentColor = ContextCompat.getColor(context, R.color.notification_accent_color)
// Build the pending intent for when the notification is clicked
val openRoomIntent = buildOpenRoomIntent(roomInfo.roomId)
@@ -478,6 +479,7 @@ class NotificationUtils @Inject constructor(private val context: Context,
System.currentTimeMillis().toInt(), intent, PendingIntent.FLAG_UPDATE_CURRENT)
setDeleteIntent(pendingIntent)
}
+ .setTicker(tickerText)
.build()
}
diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml
index ccf4dfee3d..2c65918b67 100644
--- a/vector/src/main/res/values/strings.xml
+++ b/vector/src/main/res/values/strings.xml
@@ -1089,6 +1089,8 @@
New Invitation
Me
** Failed to send - please open room
+ %1$s: %2$s
+ %1$s: %2$s %3$s
Search for historical