Skip to content

Commit

Permalink
v2.2.0+80
Browse files Browse the repository at this point in the history
  • Loading branch information
w8385 committed Oct 10, 2024
1 parent 091cd19 commit a798386
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
12 changes: 6 additions & 6 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@
</intent-filter>
</activity>

<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<receiver
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver"
android:exported="false" />
<receiver
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
Expand All @@ -50,11 +55,6 @@
android:name="flutterEmbedding"
android:value="2" />

<service
android:name="com.dexterous.flutterlocalnotifications.ForegroundService"
android:exported="true"
android:stopWithTask="false" />

</application>
<queries>
<intent>
Expand Down
6 changes: 6 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ Future<void> main() async {
Future<void> _initLocalNotification() async {
FlutterLocalNotificationsPlugin localNotificationsPlugin =
FlutterLocalNotificationsPlugin();
localNotificationsPlugin
.resolvePlatformSpecificImplementation<
AndroidFlutterLocalNotificationsPlugin>()
?.requestNotificationsPermission();

AndroidInitializationSettings androidInitializationSettings =
const AndroidInitializationSettings("mipmap/ic_launcher");
DarwinInitializationSettings iosInitializationSettings =
Expand All @@ -30,6 +35,7 @@ Future<void> _initLocalNotification() async {
requestBadgePermission: false,
requestSoundPermission: false,
);

InitializationSettings initializationSettings = InitializationSettings(
android: androidInitializationSettings, iOS: iosInitializationSettings);
await localNotificationsPlugin.initialize(initializationSettings);
Expand Down
2 changes: 1 addition & 1 deletion packages/apis/notification_api/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ environment:
sdk: '>=3.3.1 <4.0.0'

dependencies:
flutter_local_notifications: ^13.0.0
flutter_local_notifications: ^17.2.3
timezone: ^0.9.1

dev_dependencies:
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: For solving problems in the world of programming; base on solved.ac

publish_to: "none" # Remove this line if you wish to publish to pub.dev

version: 2.2.0+79
version: 2.2.0+80

environment:
sdk: ">=2.18.2 <3.0.0"
Expand All @@ -17,7 +17,7 @@ dependencies:
extended_image: ^8.1.0
fluttertoast: ^8.2.8
flutter_bloc: ^8.1.3
flutter_local_notifications: ^13.0.0
flutter_local_notifications: ^17.2.3
flutter_native_timezone: ^2.0.0
flutter_radar_chart: ^0.2.1
pie_chart: ^5.4.0
Expand Down

0 comments on commit a798386

Please sign in to comment.