Skip to content
Closed
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
18a7a2f
Adding bubbles support
arlexTech Nov 14, 2025
57c2d7f
fix ktlintCheck detekt testGplayDebugUnitTest
arlexTech Nov 14, 2025
0053b5b
remove deprecated onBackPressed and extracted code in function
arlexTech Nov 27, 2025
734a700
prevent second app instance and adding talk icon button in bubble mode
arlexTech Dec 5, 2025
3cc598e
fix potential issue with room token
arlexTech Dec 6, 2025
eaf4731
fix getLargeIcon preventing bubble notification
arlexTech Dec 6, 2025
63f0818
bubbles off by default and lead to android bubble settings if needed …
arlexTech Dec 6, 2025
7c463cb
codacy warnings
arlexTech Dec 28, 2025
4e23c56
systemNotificationId fix
arlexTech Dec 28, 2025
d11c761
Fix 2 bubbles
arlexTech Dec 28, 2025
0578f62
Merge branch 'master' into feature/bubble-conversations
arlexTech Jan 1, 2026
605af97
fix user provider usage
mahibi Jan 8, 2026
6a5a728
change logic to not delete bubbles
mahibi Jan 8, 2026
0341869
fix to enable system bubble when they are disabled but "create bubble…
mahibi Jan 8, 2026
39bb469
Merge branch 'nextcloud:master' into feature/bubble-conversations
arlexTech Jan 8, 2026
43f442f
Merge branch 'nextcloud:master' into feature/bubble-conversations
arlexTech Jan 9, 2026
304da57
Remove outdated comment
arlexTech Jan 10, 2026
a255e19
Merge branch 'nextcloud:master' into feature/bubble-conversations
arlexTech Jan 12, 2026
374c378
Fix build
arlexTech Jan 12, 2026
8ab2945
Extracted bubble logic
arlexTech Jan 12, 2026
658d629
Fix codacy
arlexTech Jan 12, 2026
93f31f2
Fix codacy fix
arlexTech Jan 12, 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
7 changes: 7 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@
android:name=".chat.ChatActivity"
android:theme="@style/AppTheme" />

<activity
android:name=".chat.BubbleActivity"
android:theme="@style/AppTheme"
android:allowEmbedded="true"
android:resizeableActivity="true"
android:documentLaunchMode="always" />

<activity
android:name=".activities.CallActivity"
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
Expand Down
93 changes: 93 additions & 0 deletions app/src/main/java/com/nextcloud/talk/chat/BubbleActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/*
* Nextcloud Talk - Android Client
*
* SPDX-FileCopyrightText: 2025 Alexandre Wery <nextcloud-talk-android@alwy.be>
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package com.nextcloud.talk.chat

import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.activity.OnBackPressedCallback
import com.nextcloud.talk.R
import com.nextcloud.talk.activities.MainActivity
import com.nextcloud.talk.utils.bundle.BundleKeys

class BubbleActivity : ChatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_talk)
supportActionBar?.setDisplayShowHomeEnabled(true)
findViewById<androidx.appcompat.widget.Toolbar>(R.id.chat_toolbar)?.setNavigationOnClickListener {
openConversationList()
}

onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
moveTaskToBack(false)
}
})
}

override fun onPrepareOptionsMenu(menu: android.view.Menu): Boolean {
super.onPrepareOptionsMenu(menu)

menu.findItem(R.id.create_conversation_bubble)?.isVisible = false
menu.findItem(R.id.open_conversation_in_app)?.isVisible = true

return true
}

override fun onOptionsItemSelected(item: android.view.MenuItem): Boolean =
when (item.itemId) {
R.id.open_conversation_in_app -> {
openInMainApp()
true
}
android.R.id.home -> {
openConversationList()
true
}
else -> super.onOptionsItemSelected(item)
}

private fun openInMainApp() {
val intent = Intent(this, MainActivity::class.java).apply {
action = Intent.ACTION_MAIN
addCategory(Intent.CATEGORY_LAUNCHER)
putExtras(this@BubbleActivity.intent)
conversationUser?.id?.let { putExtra(BundleKeys.KEY_INTERNAL_USER_ID, it) }
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP
}
startActivity(intent)
}

private fun openConversationList() {
val intent = Intent(this, MainActivity::class.java).apply {
action = Intent.ACTION_MAIN
addCategory(Intent.CATEGORY_LAUNCHER)
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP
}
startActivity(intent)
}

@Deprecated("Deprecated in Java")
override fun onSupportNavigateUp(): Boolean {
openInMainApp()
return true
}

companion object {
fun newIntent(context: Context, roomToken: String, conversationName: String?): Intent =
Intent(context, BubbleActivity::class.java).apply {
putExtra(BundleKeys.KEY_ROOM_TOKEN, roomToken)
conversationName?.let { putExtra(BundleKeys.KEY_CONVERSATION_NAME, it) }
action = Intent.ACTION_VIEW
flags = Intent.FLAG_ACTIVITY_NEW_DOCUMENT or Intent.FLAG_ACTIVITY_MULTIPLE_TASK
}
}
}
Loading
Loading