element-hq / element-x-android

Android Matrix messenger application using the Matrix Rust Sdk and Jetpack Compose
GNU Affero General Public License v3.0
1.03k stars 145 forks source link

Publish room shortcuts #1586

Open dkter opened 1 year ago

dkter commented 1 year ago

Your use case

What would you like to do?

Publish room shortcuts -- the links to rooms that appear when you long press an app icon, or that appear in the sharing menu (sharing shortcuts).

Example screenshot of shortcuts on home screen from Android docs

Example screenshot of sharing shortcuts from Android docs

Why would you like to do it?

Feature parity with the old Element Android, and would fix #1547 since notifications must be associated with a shortcut to be considered conversations (see https://developer.android.com/develop/ui/views/notifications/conversations).

How would you like to achieve it?

Shortcut creation in the old Element Android is handled in this class. On initialization, the app pushes the entire list of rooms as shortcuts as ordered on the room list screen.

The Android docs recommend re-pushing the shortcut on every incoming/outgoing message.

I put together a quick implementation just to see if this would fix #1547 -- it just pushes a room shortcut every time a notification is sent. Probably not an ideal/permanent solution (though this does seem to be how Discord handles things) but it does work and does fix #1547

Have you considered any alternatives?

No response

Additional context

No response

Are you willing to provide a PR?

No

kittykat commented 1 year ago

We would like to add this feature as it works in the legacy app, but it is not currently on our immediate roadmap. External contributions are welcome.

andrew-mi commented 9 months ago

This feature would be very useful for WearOS users by enabling the system quick reply functionality on the watch itself. Would very much appreciate if it could be included in a future release.