-
Notifications
You must be signed in to change notification settings - Fork 731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bubbles API support #1124
Comments
I had a go at implementing bubbles but haven't figured it out yet. There are some API changes between the Android 10 and 11 versions of bubbles so it might make sense to hold off until AndroidX supports API 30 |
Hi, any updates on this? |
Here is the implementation on signal signalapp/Signal-Android@e1bf232 maybe it helps the developer |
Is there any update on this? |
Any update on this? |
I have started to work on this. I haven't done any android dev since 2016, so progress may be really slow. But I really want to use this feature, so I thought I'd give it a shot. I am able to get bubbles to expand without immediately crashing, but I still have a lot of work left. |
Hi any updates on this would love to see this feature on element keep up the nice work 😀 |
I had a go at this as well a while ago. I ended up at roughly the same point as the user above : The bubbles themselves work, but at the cost of a few features and issues, such as having to manually clear a notification.
Cancelling a notification "as usual" also cancels the bubble, closing it instantly on opening the notification. I've been using it for a while, but I've had no time or skills to dig deeper on this unfortunately. Signal's implementation could be helpful, or this Android sample, as well as this blog from Slack |
Came back to this and fixed the main blockers, such as the ability to properly dismiss conversations, mark them as read, etc. Also fixed some issues I've had with duplicate notification alerts that seem to be from element upstream. Code is a bit messy right now but is available here : Bubbles work great and I've been using this nicely as a daily driver. |
That is great to hear! Would you consider opening an MR to this repo? |
Hi - I would be glad to. As it is, a PR would not be accepted however, due to the last 1-2 bugs and code format/quality. I am not skilled enough in Android development to meet the quality bar for contributions to this repo. I need the extra help for that, which is why my code is public and help from the community or from Element would be super appreciated 🙂 Some tech details on the last bugThe main bug left is related to the activities : Every time Element is opened from the launcher, a new activity/task is added to the Android task list view, not reusing the previous ones. This likely happens because the launcher activity documentLaunchMode is set to "always", as required for Bubbles to work. ( See https://developer.android.com/develop/ui/views/notifications/bubbles#bubble-api ) Not sure how to proceed or which activity to set as the bubble activity instead. |
I'm not an experienced android developer either, but this is likely the cause of it by looking at the docs. Fun that they dont give a recommendation for this, even though I assume this would result in having multiple tasks in the recents view even for the same person/room. I have taken a look at an other messaging app on my phone that I know supports bubbles (telegram), and does not have this issue. It seems to solve this by having a separate activity thats being opened by the launcher icon. Element X has defined its MainActivity as the one to be started by the launcher icon, and by looking at your branch, it seems thats what is used for the chat history too, not just the room list. The solution (or one solution) would be to make a separate activity for starting from the launcher, like Telegram does it, move the intentfilter in the AndroidManifest.xml file that has the If you open an MR, the devs may be able to give some tips, but also at least it is visible that there is an almost-implemented feature for supporting bubbles. An MR also grants permission for the Element repo owners write permissions to your branch, I believe. |
The Android 11 developer preview is introducing the Bubbles API, which allows chat apps to display notifications as openable bubbles much like Facebook Messenger.
It would be nice if RiotX supported this to make opening notifications more convenient.
The text was updated successfully, but these errors were encountered: