SmartPrompter Documentation Beta

Class Alarm​Scheduler

class AlarmScheduler

Alarm scheduling class to schedule alarm

Methods

schedule​Notification(title:​date​Components:​id:​)

func scheduleNotification(title: String, dateComponents: DateComponents, id: String?)

Function to schedule alarm for the first time after doanloaded from Firebase. Simply call this function and it will push the alarm to the OS notification center

Parameters

title String

alarm identifier string

date​Components Date​Components

The date of the alarm when it should be triggered

id String?

Firebase ID fetched from firebase just tracking the alarm data

reschedule​Notification(title:​id:​)

public func rescheduleNotification(title: String, id: String?)

Reschedule alam once the the alarm is delayed

Parameters

title String

alarm identifier string

id String?

Firebase ID fetched from firebase just tracking the alarm data

clear​Notifications(title:​)

func clearNotifications(title: String)

Request OS to remove notification from pending list and clear the notification list already delivered

Parameters

title String

Alarm identifier string