Adding bubbles support
Issue: https://github.com/nextcloud/talk-android/issues/3384
🖼️ Screenshots
| General settings | Conversation Info |
https://github.com/user-attachments/assets/d48935d7-b47d-4473-a7fc-c078683e4cc9
https://github.com/user-attachments/assets/0e90219a-8e0d-4319-9a36-71dc538aadac
🚧 TODO
- [x] Bubble Works
- [x] Activating bubbles in settings
- [x] Activating or not bubbles for each conversation
- [x] Use Conversation Avatar for bubble icon
- [x] Multiple bubbles for multiple conversations
- [x] Embedded view
- [x] Create a bubble notification upon received message
🏁 Checklist
- [ ] ⛑️ Tests (unit and/or integration) are included or not needed
- [ ] 🔖 Capability is checked or not needed
- [ ] 🔙 Backport requests are created or not needed:
/backport to stable-xx.x - [ ] 📅 Milestone is set
- [ ] 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)
thank you @arlexTech we will review soon!
@rapterjet2004 @sowjanyakch please also do a deep review. E.g. specially check if former notification handling is affected by the changes.
I'll work on it this week (don't mind the review request i miss clicked)
I'll work on it this week (don't mind the review request i miss clicked)
Sure, thanks. Let us know if there are any questions or help is needed!
Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
Thank you for contributing to Nextcloud and we hope to hear from you soon!
(If you believe you should not receive this message, you can add yourself to the blocklist.)
For the back button in bubbled mode I replaced it by the talk icon in bubble mode which open the app in normal mode on the conversation list
as
onBackPressedis deprecated we want to avoid it and useonBackPressedDispatcher
fixed
multiple instances of the app are opened when "open is app" is used. https://developer.android.com/develop/ui/views/notifications/bubbles#launching-activities
should be fixed, I couldn't open multiple anymore
please try to extract the above code into a method
done
why is this removed?
because it was preventing bubbles to show up but it should be fixed now
I wanted the handleOnBackPressed function to minimize the bubble but I tried for hours and never managed to make it work correctly, if anyone has an idea of how to do it, I'm open to try anything at this point
Tell me if i can do anything more to merge it
But also we should not allow to have 2 instances for the same conversation when one is opened in normal mode and one in bubble mode. This is very important to avoid bugs in the chat repository (OfflineFirstChatRepository)! Signal solved it this way: Whenever there is a bubble for a chat and the chat is also opened in the normal mode, the bubble closes. We should solve it the same way and try to use only one instance of ChatActivity for a conversation.
I didn't see this part, I wonder how Messenger deal with that because it can have the bubble and the chat open at the same time
Thank you for your feedback, i try to fix all of this and if I'm hard stuck I'll ask for help