Skip to content

[DX-284] Flutter push notifications guide#3249

Merged
maratal merged 1 commit intomainfrom
DX-284-flatter-push-guide
May 6, 2026
Merged

[DX-284] Flutter push notifications guide#3249
maratal merged 1 commit intomainfrom
DX-284-flatter-push-guide

Conversation

@maratal
Copy link
Copy Markdown
Collaborator

@maratal maratal commented Mar 5, 2026

Description

Flutter push notifications tutorial.

https://ably.atlassian.net/browse/DX-284

Checklist

@maratal maratal added the review-app Create a Heroku review app label Mar 5, 2026
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-gskfom March 5, 2026 15:13 Inactive
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 5, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 528fa735-bcf9-4803-955b-e87b6c06bdff

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DX-284-flatter-push-guide

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-gskfom March 5, 2026 22:52 Inactive
@ably-ci ably-ci had a problem deploying to ably-docs-dx-284-flatte-gskfom March 5, 2026 23:00 Failure
@ably-ci ably-ci had a problem deploying to ably-docs-dx-284-flatte-gskfom March 6, 2026 00:08 Failure
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-gskfom March 6, 2026 00:11 Inactive
@ably-ci ably-ci had a problem deploying to ably-docs-dx-284-flatte-gskfom March 7, 2026 17:35 Failure
@maratal maratal force-pushed the DX-284-flatter-push-guide branch from 04c81a6 to ebef656 Compare March 7, 2026 21:14
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-gskfom March 7, 2026 21:15 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-gskfom March 8, 2026 17:28 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-gskfom March 8, 2026 17:49 Inactive
@ably-ci ably-ci had a problem deploying to ably-docs-dx-284-flatte-gskfom March 8, 2026 18:18 Failure
@ably-ci ably-ci had a problem deploying to ably-docs-dx-284-flatte-gskfom March 8, 2026 22:02 Failure
@maratal maratal force-pushed the DX-284-flatter-push-guide branch from 5805594 to 0979304 Compare March 8, 2026 22:22
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-gskfom March 8, 2026 22:22 Inactive
@maratal maratal force-pushed the DX-284-flatter-push-guide branch from 0979304 to 0c443a9 Compare March 8, 2026 23:21
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-gskfom March 8, 2026 23:22 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-gskfom March 9, 2026 01:16 Inactive
@maratal maratal changed the title Add Flutter push notifications getting started guide [DX-284] Flutter push notifications guide Mar 9, 2026
@maratal maratal force-pushed the DX-284-flatter-push-guide branch from b55cf04 to c2b509b Compare March 9, 2026 01:43
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-gskfom March 9, 2026 01:44 Inactive
@maratal maratal force-pushed the DX-284-flatter-push-guide branch from c2b509b to e486e5b Compare March 9, 2026 02:00
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-gskfom March 9, 2026 02:00 Inactive
@maratal maratal force-pushed the DX-284-flatter-push-guide branch from e486e5b to 1bfa5ff Compare March 9, 2026 03:03
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-gskfom March 9, 2026 03:03 Inactive
@maratal maratal marked this pull request as ready for review March 9, 2026 03:04
@maratal maratal requested a review from GregHolmes March 9, 2026 03:04
@maratal maratal requested a review from m-hulbert March 23, 2026 18:44
Add the Google Services plugin to `android/build.gradle`:

<Code>
```kotlin
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd make this (and the next one) text or shell otherwise we're mixing Kotlin with Flutter in this guide.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


## 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:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replaced Realtime with Pub/Sub

```
</Code>

<Aside data-type='note'>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I had the same comments here as in the React Native guide.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to prereq


## 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed "Send push with code" step

@maratal maratal added review-app Create a Heroku review app and removed review-app Create a Heroku review app labels Apr 23, 2026
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-1f8a0f April 23, 2026 15:21 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-1f8a0f April 23, 2026 15:42 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-1f8a0f April 23, 2026 22:31 Inactive
@maratal maratal force-pushed the DX-284-flatter-push-guide branch from af7e997 to 92b5496 Compare April 23, 2026 23:00
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-1f8a0f April 23, 2026 23:01 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-1f8a0f April 24, 2026 07:55 Inactive
@maratal maratal force-pushed the DX-284-flatter-push-guide branch from b093919 to 441c7a2 Compare April 26, 2026 22:35
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-1f8a0f April 26, 2026 22:36 Inactive
```
</Code>

## Step 3: Test admin push notifications <a id="step-3"/>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all addressed

@maratal maratal force-pushed the DX-284-flatter-push-guide branch from 603d9b6 to a886f2e Compare May 3, 2026 20:10
@maratal maratal added review-app Create a Heroku review app and removed review-app Create a Heroku review app labels May 3, 2026
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-n0ycqk May 3, 2026 20:34 Inactive
@maratal maratal force-pushed the DX-284-flatter-push-guide branch from a886f2e to 20ae023 Compare May 3, 2026 21:28
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-n0ycqk May 3, 2026 21:28 Inactive
@maratal maratal force-pushed the DX-284-flatter-push-guide branch from 20ae023 to 9d0418e Compare May 6, 2026 15:14
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-n0ycqk May 6, 2026 15:14 Inactive
Copy link
Copy Markdown
Contributor

@m-hulbert m-hulbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with 1 quick fix to a codeblock!

Add the following dependencies to your `pubspec.yaml`:

<Code fixed="true">
```yaml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@maratal maratal force-pushed the DX-284-flatter-push-guide branch from 9d0418e to 854df34 Compare May 6, 2026 19:50
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-n0ycqk May 6, 2026 19:50 Inactive
@maratal maratal force-pushed the DX-284-flatter-push-guide branch from 854df34 to 9d8e75d Compare May 6, 2026 19:51
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-n0ycqk May 6, 2026 19:51 Inactive
@maratal maratal force-pushed the DX-284-flatter-push-guide branch from 9d8e75d to b6380f2 Compare May 6, 2026 21:51
@ably-ci ably-ci temporarily deployed to ably-docs-dx-284-flatte-n0ycqk May 6, 2026 21:51 Inactive
@maratal maratal merged commit 04a4fa7 into main May 6, 2026
7 checks passed
@maratal maratal deleted the DX-284-flatter-push-guide branch May 6, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-app Create a Heroku review app

Development

Successfully merging this pull request may close these issues.

3 participants