[DX-284] Flutter push notifications guide#3249
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
04c81a6 to
ebef656
Compare
5805594 to
0979304
Compare
0979304 to
0c443a9
Compare
b55cf04 to
c2b509b
Compare
c2b509b to
e486e5b
Compare
e486e5b to
1bfa5ff
Compare
| Add the Google Services plugin to `android/build.gradle`: | ||
|
|
||
| <Code> | ||
| ```kotlin |
There was a problem hiding this comment.
I'd make this (and the next one) text or shell otherwise we're mixing Kotlin with Flutter in this guide.
|
|
||
| ## Step 1: Set up Ably <a id="step-1"/> | ||
|
|
||
| Create a new file `lib/ably_service.dart` to manage your Ably Realtime client across the app: |
There was a problem hiding this comment.
We've got a mix of 'realtime client' and 'Flutter SDK' in this guide too. We should be consistent with how we're referring to things.
There was a problem hiding this comment.
replaced Realtime with Pub/Sub
| ``` | ||
| </Code> | ||
|
|
||
| <Aside data-type='note'> |
There was a problem hiding this comment.
I think I had the same comments here as in the React Native guide.
|
|
||
| ## Step 5: Send push with code <a id="step-5"/> | ||
|
|
||
| The `ably_flutter` SDK does not implement the [Push Admin API](/docs/api/realtime-sdk/push-admin), so sending push directly to a `deviceId` or `clientId` from a Flutter client is not supported. Use the [Ably REST API](/docs/api/rest-sdk) from your backend server for direct push. |
There was a problem hiding this comment.
I don't think we need to state that an API isn't supported. We should just state how to use the REST API in this instance.
There was a problem hiding this comment.
removed "Send push with code" step entirely
| ``` | ||
| </Code> | ||
|
|
||
| Build and run the app again. Tap **Subscribe to Channel** first, then **Send Push to Channel** to send a push notification to all subscribed devices: |
There was a problem hiding this comment.
As per the other comment - we should ideally be separating out the publish and subscribe - so perhaps send via CLI and receive in-app to reflect a real-world scenario.
There was a problem hiding this comment.
removed "Send push with code" step
af7e997 to
92b5496
Compare
b093919 to
441c7a2
Compare
| ``` | ||
| </Code> | ||
|
|
||
| ## Step 3: Test admin push notifications <a id="step-3"/> |
There was a problem hiding this comment.
I think my comments throughout are the same as those I just made for React native - though noting here that on both we should certainly rename this heading.
603d9b6 to
a886f2e
Compare
a886f2e to
20ae023
Compare
20ae023 to
9d0418e
Compare
m-hulbert
left a comment
There was a problem hiding this comment.
Approved with 1 quick fix to a codeblock!
| Add the following dependencies to your `pubspec.yaml`: | ||
|
|
||
| <Code fixed="true"> | ||
| ```yaml |
There was a problem hiding this comment.
It seems yaml isn't supported properly as a language right now. Maybe switch this to text to get this PR sorted and I'll add support separately.
9d0418e to
854df34
Compare
854df34 to
9d8e75d
Compare
9d8e75d to
b6380f2
Compare
Description
Flutter push notifications tutorial.
https://ably.atlassian.net/browse/DX-284
Checklist