-
Notifications
You must be signed in to change notification settings - Fork 43
Add Jetpack Compose guide for Ably Chat integration. #2622
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
base: main
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
428a22c
to
4bf519f
Compare
1a14989
to
ab4a0ae
Compare
4bf519f
to
e614cec
Compare
e614cec
to
fd154ff
Compare
This guide outlines setup and usage of Ably Chat in an Android app built with Jetpack Compose. It covers key features such as realtime messaging, presence, reactions, message history, and resource management.
fd154ff
to
44984bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed up to Step 6, but I can't get past that point as the app crashes, so will leave my review here for now :)
|
||
## Step 1: Setting up Ably <a id="step-1"/> | ||
|
||
Replace the contents of your `MainActivity.kt` file with the following code to set up the Ably client: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely needs an explicit callout here to add your key (should we encourage good practice by setting it in build config?)
Defintely worth calling out that we're using a key but in prod you'd use tokens
- Updated import list, so all imports for the `ChatBox` component are predefined - Fixed typos - Improved app layout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting to take shape! Just a few final comments :)
fun ConnectionStatusUi(connection: Connection) { | ||
val connectionStatus = connection.collectAsStatus() | ||
Text( | ||
text = "Connection Status: $connectionStatus", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me - the connection status in the top of the app is never updating. I get a log in logcat to say it has, but the screen never re-paints. It just gets stuck at connecting,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, the only time it transitions to "connected" is when I get to the next step, and things re-paint because the room UI is added
``` | ||
</Code> | ||
|
||
3. Add an edit button to each message: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to get an idea of where to add this - I couldn't work out whether this code was replacing some other code that's already there, or something i should add above something else to get the desired effect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps just some clarity on where the replace is
|
||
|
||
|
||
Add this utility function to help with message updates: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest we move this up so we don't give someone a red line in the IDE for introducing it before its defined
This guide outlines setup and usage of Ably Chat in an Android app built with Jetpack Compose. It covers key features such as realtime messaging, presence, reactions, message history, and resource management.
Description
Checklist