[Problem/Question]
I am implementing Chat functionality in an Android app built entirely with Jetpack Compose (latest version).
I have gone through the two example projects in Sendbird UiKit (latest version) and looked at the source of various modules & Fragments. I see that out-of-the-box components such as ChannelListFragment
can be embedded in a Composable via AndroidView
, however, when a Channel is selected, a new ChannelActivity
is presented to the user. This isn’t really an experience we want in the application.
Is there any plan to provide a set of Jetpack Compose components for Android developers to use?
I managed to implement a not-so-elegant solution over the last few days. For anyone interested –
-
ChannelListFragment
and ChannelFragment
are wrapped in their own Composables via a AndroidView
.
- I used one of the techniques discussed in this blog post to get the Fragment behaving correctly when in Composables.
- Remember to call
SendbirdUIKit.init
with the applicationContext
in the main Activity
or using this
in Application
class.
- Multidex needs to be turned on otherwise the 64K limit causes weird issues in the application.
5 The Application
class must inherit from MultiDexApplication
.
Hope this helps someone. It is disappointing to see no one from Sendbird support or engineering post a response in this topic.