Skip to content

Commit 18de57d

Browse files
authored
update getting started section in readme, move info on resource shrinking (#434)
* update getting started section in readme, move info on resource shrinking * build example app in debug mode as part of CI
1 parent a997153 commit 18de57d

File tree

5 files changed

+13
-48
lines changed

5 files changed

+13
-48
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build_example_android_task:
55
folder: ~/.pub-cache
66
build_script:
77
- cd flutter_local_notifications/example
8-
- flutter build apk
8+
- flutter build apk --debug
99

1010
build_example_ios_task:
1111
osx_instance:
@@ -15,7 +15,7 @@ build_example_ios_task:
1515
update_pods_script: pod repo update # to fetch all the latest versions
1616
build_script:
1717
- cd flutter_local_notifications/example
18-
- flutter build ios --no-codesign
18+
- flutter build ios --no-codesign --debug
1919

2020
test_platform_interface_task:
2121
container:

flutter_local_notifications/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# [0.9.1+3]
2+
* Include notes in getting started section to emphasise that the steps in the integration guide for each platform needs to be done.
3+
* Move information in the readme on configuring resources to keep on Android.
4+
15
# [0.9.1+2]
26
* Update link to repository due to restructuring.
37

flutter_local_notifications/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Contributions are welcome by submitting a PR for me to review. If it's to add ne
6565

6666
## Getting Started
6767

68-
The GitHub repository has an example app that should demonstrate of all the supported features of the plugin. Please check the example for more detailed code samples. If you only copy and paste the Dart code then this will not work as there's setup required for each platform. Pub also generates API docs for the latest version [here](https://pub.dartlang.org/documentation/flutter_local_notifications/latest/)
68+
The GitHub repository has an example app that should demonstrate of all the supported features of the plugin. Please check the example for more detailed code samples. If you only copy and paste the Dart code then this will not work as there's setup required for each platform. Pub also generates API docs for the latest version [here](https://pub.dartlang.org/documentation/flutter_local_notifications/latest/). Besides referring to the example app and getting started section, please ensure that you have performed the steps in the integration guide for each platform further below.
6969

7070
The following samples will demonstrate the more commonly used functionalities. The first step is to create a new instance of the plugin class and then initialise it with the settings to use for each platform
7171

@@ -318,14 +318,16 @@ When specifying the large icon bitmap or big picture bitmap (associated with the
318318

319319
Note that with 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.
320320

321-
When doing a release build of your app, you'll 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. If you have resource shrinking enabled, ensure that you have customised the resources that should be kept so that things like your notification images aren't discarded by following the instructions [here](https://developer.android.com/studio/build/shrink-code#keep-resources).
321+
When doing a release build of your app, you'll 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.
322322

323323
```
324324
-keep class com.dexterous.** { *; }
325325
```
326326

327327
The plugin also makes use of GSON and the Proguard rules can be found [here](https://github.com/google/gson/blob/master/examples/android-proguard-example/proguard.cfg). The example app has a consolidate Proguard rules (`proguard-rules.pro`) file that combines these together for reference.
328328

329+
If you have resource shrinking enabled, ensure that you have customised the resources that should be kept so that things like your notification images aren't discarded by following the instructions [here](https://developer.android.com/studio/build/shrink-code#keep-resources).
330+
329331
**IMPORTANT**: Starting from version 0.5.0, this library no longer uses the deprecated Android support libraries and has migrated to AndroidX. Developers may require migrating their apps to support this following [this guide](https://developer.android.com/jetpack/androidx/migrate)
330332

331333
## iOS Integration
Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
name: flutter_local_notifications_example
22
description: Demonstrates how to use the flutter_local_notifications plugin.
3+
publish_to: none
34

45
dependencies:
56
flutter:
67
sdk: flutter
7-
8-
# The following adds the Cupertino Icons font to your application.
9-
# Use with the CupertinoIcons class for iOS style icons.
108
cupertino_icons: ^0.1.3
119
http: ^0.12.0+2
1210
path_provider: ^1.5.1
@@ -20,44 +18,5 @@ dev_dependencies:
2018
flutter_local_notifications:
2119
path: ../
2220

23-
# For information on the generic Dart part of this file, see the
24-
# following page: https://www.dartlang.org/tools/pub/pubspec
25-
26-
# The following section is specific to Flutter.
2721
flutter:
28-
29-
# The following line ensures that the Material Icons font is
30-
# included with your application, so that you can use the icons in
31-
# the material Icons class.
32-
uses-material-design: true
33-
34-
# To add assets to your application, add an assets section, like this:
35-
# assets:
36-
# - images/a_dot_burr.jpeg
37-
# - images/a_dot_ham.jpeg
38-
39-
# An image asset can refer to one or more resolution-specific "variants", see
40-
# https://flutter.io/assets-and-images/#resolution-aware.
41-
42-
# For details regarding adding assets from package dependencies, see
43-
# https://flutter.io/assets-and-images/#from-packages
44-
45-
# To add custom fonts to your application, add a fonts section here,
46-
# in this "flutter" section. Each entry in this list should have a
47-
# "family" key with the font family name, and a "fonts" key with a
48-
# list giving the asset and other descriptors for the font. For
49-
# example:
50-
# fonts:
51-
# - family: Schyler
52-
# fonts:
53-
# - asset: fonts/Schyler-Regular.ttf
54-
# - asset: fonts/Schyler-Italic.ttf
55-
# style: italic
56-
# - family: Trajan Pro
57-
# fonts:
58-
# - asset: fonts/TrajanPro.ttf
59-
# - asset: fonts/TrajanPro_Bold.ttf
60-
# weight: 700
61-
#
62-
# For details regarding fonts from package dependencies,
63-
# see https://flutter.io/custom-fonts/#from-packages
22+
uses-material-design: true

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: 0.9.1+2
3+
version: 0.9.1+3
44
homepage: https://github.com/MaikuB/flutter_local_notifications/tree/master/flutter_local_notifications
55

66
dependencies:

0 commit comments

Comments
 (0)