Skip to content

Commit

Permalink
Moved workaround documentation to PushNotifications.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
ikbalkaya committed Jan 14, 2022
1 parent b12a507 commit b728038
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 10 additions & 0 deletions PushNotifications.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Push Notifications


#### [Important Note regarding Firebase and Push Notifications](https://github.com/ably/ably-flutter/issues/226)

If you are using the [official Firebase messaging library package](https://pub.dev/packages/firebase_messaging) along with this library, then you must add the following block to your Android application's manifest file within the `application` element. This is a workaround that prevents a conflict rising from the two libraries installed together.

```xml
<receiver android:name="io.ably.flutter.plugin.push.FirebaseMessagingReceiver"
tools:node="remove">
</receiver>
```
Push Notifications allow you to reach users who have your application in the foreground, background and terminated, including when your application is not connected to Ably. Push notifications allow you to run code and show alerts to the user. On iOS, Ably connects to [APNs](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html) to send messages to devices. On Android, Ably connects to [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/) to send messages to devices. As both services do not guarantee message delivery and may even throttle messages to specific devices based on battery level, message frequency, and other criteria, messages may arrive much later than sent or ignored.

## Known Limitations
Expand Down
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,6 @@ Under the run/ debug configuration drop down menu, click `Edit Configurations...

See [PushNotifications.md](PushNotifications.md) for detailed information on getting PN working with the example app.

#### [Important Note regarding Firebase and Push Notifications](https://github.com/ably/ably-flutter/issues/226)

If you are using the [official Firebase messaging library package](https://pub.dev/packages/firebase_messaging) along with this library, then you must add the following block to your Android application's manifest file within the `application` element. This is a workaround that prevents a conflict rising from the two libraries installed together.

```xml
<receiver android:name="io.ably.flutter.plugin.push.FirebaseMessagingReceiver"
tools:node="remove">
</receiver>
```

### Troubleshooting

- Running on simulator on M1 macs:
Expand Down

0 comments on commit b728038

Please sign in to comment.