Skip to content

Commit

Permalink
Merge branch 'master' into time_zone_macos_support
Browse files Browse the repository at this point in the history
  • Loading branch information
MaikuB committed Jul 7, 2020
2 parents 1d9b97f + dbe1e65 commit 7b682e9
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 42 deletions.
15 changes: 6 additions & 9 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
---
name: Bug report
about: Create a report to help us improve
about: Create a report about bug that you've come across
title: ''
labels: ''
assignees: ''

---

**IMPORTANT**
If you are getting a build error on Android that mentions AndroidX incompatibilities, before reporting an issue, please make sure look at the error information carefully as there should be a URL that provides information on migrating your application to AndroidX.

Also note that the plugin has an example application that should cover all of the available functionality. Please check the example application and see if the functionality works before logging an issue. You'll need to clone the repository to run it
<!-- **IMPORTANT: before filing a bug report, please make sure you checked that you have done everything that is covered in the readme as there are steps that need to be followed to get the plugin working correctly on both platforms. You can make use of the example app as a reference to see how the plugin behaves -->

**Describe the bug**
A clear and concise description of what the bug is.
<!-- A clear and concise description of what the bug is. -->

**To Reproduce**
If applicable, steps to reproduce the behavior:
<!-- You must include steps to reproduce the problem -->
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
If applicable, clear and concise description of what you expected to happen.
<!-- If applicable, clear and concise description of what you expected to happen. -->

**Sample code to reproduce the problem**
Ideally, include a link to a repository that contains code that can reproduce the problem. Suggestion is to fork this repository to modify the example app. Note that without a sample, it'll be may be more difficult to reproduce the problem and/or investigate further
<!-- Unless the bug is an obvious one, you must include a link to repository that contains a minimal app that can reproduce the problem. Otherwise, the bug will be closed as it's not sustainable to rely on guesswork. One way to do to provide a minimal app is to fork this repository and modify the example app so that the bug can be reproduced. -->
7 changes: 6 additions & 1 deletion flutter_local_notifications/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# [1.5.0-beta.5]

* [Android] Fix initialisation of ThreeTen Android Backport library when notifications are being rescheduled
* Removed `e2e` dependency from merging in changes from 1.4.4+2 release

# [1.5.0-beta.4]

* [Android] Fix issue where the ThreeTen Android Backport library wasn't initialised
* Bump e2e dev dependency
* Bump `e2e` dev dependency

# [1.5.0-beta.3]

Expand Down Expand Up @@ -44,6 +45,10 @@
* Bumped Android dependencies
* Updated example app's Proguard rules file to match latest configuration required by GSON
* Bumped lower bound of Dart SDK dependency to 2.6
# [1.4.4+2]

* [Android] Updated readme and plugin to fix issue [689](https://github.com/MaikuB/flutter_local_notifications/issues/689) where plugin needs to ensure notifications stay scheduled after an application update
* Removed `e2e` dependency

# [1.4.4+1]

Expand Down
5 changes: 3 additions & 2 deletions flutter_local_notifications/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,13 @@ If your application needs the ability to schedule notifications then you need to
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
```

The following is also needed to ensure scheduled notifications remain scheduled upon a reboot (this is handled by the plugin)
The following is also needed to ensure notifications remain scheduled upon a reboot and after an application is updated

```xml
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"></action>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
</intent-filter>
</receiver>
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ public class ScheduledNotificationBootReceiver extends BroadcastReceiver
@Override
public void onReceive(final Context context, Intent intent) {
String action = intent.getAction();
if (action != null && action.equals(android.content.Intent.ACTION_BOOT_COMPLETED)) {
FlutterLocalNotificationsPlugin.rescheduleNotifications(context);
if (action != null) {
if (action.equals(android.content.Intent.ACTION_BOOT_COMPLETED)
|| action.equals(Intent.ACTION_MY_PACKAGE_REPLACED)) {
FlutterLocalNotificationsPlugin.rescheduleNotifications(context);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"></action>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
</intent-filter>
</receiver>
<!-- Don't delete the meta-data below.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,21 @@ import 'package:flutter_test/flutter_test.dart';
void main() {
E2EWidgetsFlutterBinding.ensureInitialized();
FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;

group('initialize()', () {
setUpAll(() async {
flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();
});
testWidgets('can initialise', (WidgetTester tester) async {
final initializationSettingsAndroid =
AndroidInitializationSettings('app_icon');
final initializationSettingsIOS = IOSInitializationSettings();
final initializationSettings = InitializationSettings(
initializationSettingsAndroid, initializationSettingsIOS);
final initialised = await flutterLocalNotificationsPlugin
.initialize(initializationSettings);
expect(initialised, isTrue);
});
});
group('resolvePlatformSpecificImplementation()', () {
setUpAll(() async {
flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();
Expand Down
1 change: 0 additions & 1 deletion flutter_local_notifications/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ dev_dependencies:
sdk: flutter
flutter_test:
sdk: flutter
e2e: ^0.6.0
mockito: ^4.1.1
plugin_platform_interface: ^1.0.1
pedantic: ^1.8.0
Expand Down

This file was deleted.

0 comments on commit 7b682e9

Please sign in to comment.