Skip to content

Commit e193b88

Browse files
authored
[flutter_local_notifications] update cavaets and release build configuration sections in readme (#660)
* update cavaets and release build configuration section in readme * fix Scheduled Android notifications heading size * fix wording * another wording tweak
1 parent 69def79 commit e193b88

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

flutter_local_notifications/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# [1.4.4+1]
2+
3+
* Added details that platform-specific implementations can be obtained to the _Caveats and limitations_ section
4+
* Added a note on restrictions imposed by the OS by Android OEMs that may be prevent scheduled notifications appearing
5+
* _Release configurations_ section of the readme renamed to _Release build configuration_
6+
17
# [1.4.4]
28

39
* [iOS] Fixes to ensure that the native completion handlers were called appropriately. If you had some issues using this plugin combined with push notifications (e.g. via `firebase_messaging`) when the app was in the foreground then I would recommend updating to this version. Thanks to [Paweł Szot](https://github.com/szotp) for picking up the gap in the code in handling the native `willPresentNotification` call

flutter_local_notifications/README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,15 @@ A cross platform plugin for displaying local notifications.
4343
* [iOS] Request notification permissions and customise the permissions being requested around displaying notifications
4444
* [iOS] Display notifications with attachments
4545

46-
47-
4846
## ⚠ Caveats and limitations
49-
Note that this plugin aims to provide abstractions for all platforms as opposed to having methods that only work on specific platforms. Each method allows passing in "platform-specifics" that contains data that is specific for customising notifications on each platform. This approach means that some scenarios may not be covered by the plugin. Feel free to fork or maintain your code for showing notifications in these situations.
47+
The cross-platform facing API exposed by the `FlutterLocalNotificationsPlugin` class doesn't expose platform-specific methods as its goal is to provide an abstraction for all platforms. As such, platform-specific configuration is passed in as data. There are platform-specific implementations of the plugin that can be obtained by calling the [`resolvePlatformSpecificImplementation`](https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/FlutterLocalNotificationsPlugin/resolvePlatformSpecificImplementation.html). An example of using this is provided in the section on requesting permissions on iOS. In spite of this, there may still be gaps that don't cover your use case and don't make sense to add as they don't fit with the plugin's architecture or goals. Developers can fork or maintain their own code for showing notifications in these situations.
5048

5149
##### Compatibility with firebase_messaging
5250
Previously, there were issues that prevented this plugin working properly with the `firebase_messaging` plugin. This meant that callbacks from each plugin might not be invoked. Version 6.0.13 of `firebase_messaging` should resolve this issue so please bump your `firebase_messaging` dependency and follow the steps covered in `firebase_messaging`'s readme file.
5351

52+
##### Scheduled Android notifications
53+
Some Android OEMs have their own customised Android OS that can prevent applications from running in the background. Consequently, scheduled notifications may not work when the application is in the background on certain devices (e.g. by Xiaomi, Huawei). If you experience problems like this then this would be the reason why. As it's a restriction imposed by the OS, this is not something that can be resolved by the plugin. Some devices may have setting that lets users control which applications run in the background. The steps for these can be vary and but is still up to the users of your application to do given it's a setting on the phone itself.
54+
5455
##### Recurring Android notifications
5556
This feature uses the [Alarm Manager](https://developer.android.com/reference/android/app/AlarmManager) API. This is standard practice but does mean the delivery of the notifications/alarms are inexact and this is documented Android behaviour as per the previous link. It has been reported that Samsung's implementation of Android has imposed a maximum of 500 alarms that can be scheduled via this API and exceptions can occur when going over the limit.
5657

@@ -63,16 +64,13 @@ Daylight saving issues for scheduled notifications is a known issue. This functi
6364
##### Custom notification sounds
6465
[iOS restrictions](https://developer.apple.com/documentation/usernotifications/unnotificationsound?language=objc) apply (e.g. supported file formats)
6566

66-
67-
6867
## 📷 Screenshots
6968

7069
| Android | iOS |
7170
| ------------- | ------------- |
7271
| <img height="480" src="https://github.com/MaikuB/flutter_local_notifications/raw/master/images/android_notification.png"> | <img height="414" src="https://github.com/MaikuB/flutter_local_notifications/raw/master/images/ios_notification.png"> |
7372

7473

75-
7674
## 👏 Acknowledgements
7775

7876
* [Javier Lecuona](https://github.com/javiercbk) for submitting the PR that added the ability to have notifications shown daily
@@ -81,8 +79,6 @@ Daylight saving issues for scheduled notifications is a known issue. This functi
8179
* [Zhang Jing](https://github.com/byrdkm17) for adding 'ticker' support for Android notifications
8280
* ...and everyone else for their contributions. They are greatly appreciated
8381

84-
85-
8682
## 📈 Testing
8783

8884
As the plugin class is not static, it is possible to mock and verify its behaviour when writing tests as part of your application.
@@ -111,7 +107,6 @@ When specifying the large icon bitmap or big picture bitmap (associated with the
111107

112108
⚠️ For Android 8.0+, sounds and vibrations are associated with notification channels and can only be configured when they are first created. Showing/scheduling a notification will create a channel with the specified id if it doesn't exist already. If another notification specifies the same channel id but tries to specify another sound or vibration pattern then nothing occurs.
113109

114-
115110
#### Scheduled notifications
116111

117112
If your application needs the ability to schedule notifications then you need to request permissions to be notified when the phone has been booted as scheduled notifications uses the `AlarmManager` API to determine when notifications should be displayed. However, they are cleared when a phone has been turned off. Requesting permission requires adding the following to the manifest (i.e. your application's `AndroidManifest.xml` file)
@@ -145,7 +140,7 @@ If the vibration pattern of an Android notification will be customised then add
145140
For reference, the example app's `AndroidManifest.xml` file can be found [here](https://github.com/MaikuB/flutter_local_notifications/blob/master/flutter_local_notifications/example/android/app/src/main/AndroidManifest.xml)
146141

147142

148-
#### Release configurations
143+
#### Release build configuration
149144

150145
Before creating the release build of your app (which is the default setting when building an APK or app bundle) you will likely need to customise your ProGuard configuration file as per this [link](https://developer.android.com/studio/build/shrink-code#keep-code) and add the following line:
151146

flutter_local_notifications/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_local_notifications
22
description: A cross platform plugin for displaying and scheduling local notifications for Flutter applications with the ability to customise for each platform.
3-
version: 1.4.4
3+
version: 1.4.4+1
44
homepage: https://github.com/MaikuB/flutter_local_notifications/tree/master/flutter_local_notifications
55

66
dependencies:

0 commit comments

Comments
 (0)