Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature -> iOS: Spam notifications on ring when app was killed #199

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Atsug0
Copy link

@Atsug0 Atsug0 commented May 7, 2024

FEATURE :

When the app is killed on IOS we can add a spam of X notification with a certain delay, you can custom the sound of the notification by adding a sound of less than 30sec on your IOS project (see in the exemple with marimba.mp3)

@@ -10,6 +10,7 @@
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
39EF213274CDCE732F2B8C44 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 98E1EA7FBDDCA7752F4C0FE7 /* Pods_Runner.framework */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
7484BE252BE9100400D9AC5F /* marimba.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 7484BE242BE9100400D9AC5F /* marimba.mp3 */; };
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il faudrait pas qu'il y ait d'audio importé dans le projet car il faudrait que ça puisse être n'importe quel audio et non un audio prédéfini.

example/ios/Runner.xcodeproj/project.pbxproj Show resolved Hide resolved
example/ios/Runner.xcodeproj/project.pbxproj Show resolved Hide resolved
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il faudrait pas que ce fichier soit modifié.

example/lib/screens/edit_alarm.dart Outdated Show resolved Hide resolved
/// - nbrOfRepeat: 10 by default, this number must not be zero or negative.
/// - hour: Enter the scheduled wake-up time here, or the time at which the notification should go off.
/// - minute: Enter the scheduled wake-up time here, or the time at which the notification should go off.
func programLocalNotif(nbrOfRepeat: Int = 10, duration: Int = 10,hour: Int, minute: Int, title: String, body: String, sound: UNNotificationSound?) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pas besoin d'avoir la doc sur les paramètres ici.

ios/Classes/services/NotificationManager.swift Outdated Show resolved Hide resolved
/// - add: This setting allows you to have intervals of 10 seconds between each notification: add * 10
/// - hour: Notification trigger time (hour)
/// - minute: Notification trigger time (minute)
/// - Returns: The full and effective date of triggering the notification
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pas besoin d'avoir la doc sur les paramètres ici non plus.

lib/model/alarm_settings.dart Outdated Show resolved Hide resolved
spamNotifOnKillIos: json['spamNotifOnKillIos'] as bool? ?? true,
nbrOfRepeat: json['nbrOfRepeat'] as int? ?? 10,
duration: json['duration'] as int? ?? 10,
notificationSound: json['notificationSound'] as String? ?? '');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il manque le trailing comma.

@gdelataillade gdelataillade changed the title pull request feature spam notification on IOS Feature -> iOS: Spam notifications on ring when app was killed May 7, 2024
lib/model/alarm_settings.dart Outdated Show resolved Hide resolved
iOSSpamNotificationSettings == other.iOSSpamNotificationSettings;
}

class IOSSpamNotificationSettings {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Faudrait mettre cette class dans un ficher à part dans src/model/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants