UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ILocalNotificationService Class Referenceabstract

#include <LocalNotification.h>

+ Inheritance diagram for ILocalNotificationService:

Public Member Functions

virtual void ClearAllLocalNotifications ()=0
 
virtual int32 ScheduleLocalNotificationAtTime (const FDateTime &FireDateTime, bool LocalTime, const FText &Title, const FText &Body, const FText &Action, const FString &ActivationEvent)=0
 
virtual int32 ScheduleLocalNotificationAtTimeOverrideId (const FDateTime &FireDateTime, bool LocalTime, const FText &Title, const FText &Body, const FText &Action, const FString &ActivationEvent, int32 IdOverride)=0
 
virtual int32 ScheduleLocalNotificationBadgeAtTime (const FDateTime &FireDateTime, bool LocalTime, const FString &ActivationEvent)=0
 
virtual void GetLaunchNotification (bool &NotificationLaunchedApp, FString &ActivationEvent, int32 &FireDate)=0
 
virtual void CancelLocalNotification (const FString &ActivationEvent)=0
 
virtual void CancelLocalNotification (int32 NotificationId)=0
 
virtual void SetLaunchNotification (FString const &ActivationEvent, int32 FireDate)=0
 

Detailed Description

Interface for local notification modules

Member Function Documentation

◆ CancelLocalNotification() [1/2]

virtual void ILocalNotificationService::CancelLocalNotification ( const FString &  ActivationEvent)
pure virtual

Cancel a local notification given the ActivationEvent

Parameters
ActivationEventThe string passed into the Schedule call for the notification to be cancelled

Implemented in FAndroidLocalNotificationService, and FIOSLocalNotificationService.

◆ CancelLocalNotification() [2/2]

virtual void ILocalNotificationService::CancelLocalNotification ( int32  NotificationId)
pure virtual

Cancel a local notification given the ActivationEvent

Parameters
NotificationIdThe Id returned from ScheduleLocalNotificationAtTime*

◆ ClearAllLocalNotifications()

virtual void ILocalNotificationService::ClearAllLocalNotifications ( )
pure virtual

Clear all pending local notifications. Typically this will be done before scheduling new notifications when going into the background

Implemented in FAndroidLocalNotificationService, and FIOSLocalNotificationService.

◆ GetLaunchNotification()

virtual void ILocalNotificationService::GetLaunchNotification ( bool NotificationLaunchedApp,
FString &  ActivationEvent,
int32 FireDate 
)
pure virtual

Get the local notification that was used to launch the app

Parameters
NotificationLaunchedAppReturn true if a notification was used to launch the app
ActivationEventReturns the name of the ActivationEvent if a notification was used to launch the app
FireDateReturns the time the notification was activated

Implemented in FAndroidLocalNotificationService, and FIOSLocalNotificationService.

◆ ScheduleLocalNotificationAtTime()

virtual int32 ILocalNotificationService::ScheduleLocalNotificationAtTime ( const FDateTime FireDateTime,
bool  LocalTime,
const FText Title,
const FText Body,
const FText Action,
const FString &  ActivationEvent 
)
pure virtual

Schedule a local notification at a specific time, inLocalTime specifies the current local time or if UTC time should be used

Parameters
FireDateTimeThe time at which to fire the local notification
LocalTimeIf true the provided time is in the local timezone, if false it is in UTC
TitleThe title of the notification
BodyThe more detailed description of the notification
ActionThe text to be displayed on the slider controller
ActivationEventA string that is passed in the delegate callback when the app is brought into the foreground from the user activating the notification
Returns
A unique identifier used to cancel the notification

Implemented in FAndroidLocalNotificationService, and FIOSLocalNotificationService.

◆ ScheduleLocalNotificationAtTimeOverrideId()

virtual int32 ILocalNotificationService::ScheduleLocalNotificationAtTimeOverrideId ( const FDateTime FireDateTime,
bool  LocalTime,
const FText Title,
const FText Body,
const FText Action,
const FString &  ActivationEvent,
int32  IdOverride 
)
pure virtual

Schedule a local notification at a specific time with a specific Id, inLocalTime specifies the current local time or if UTC time should be used Currently only works for Android.

Parameters
FireDateTimeThe time at which to fire the local notification
LocalTimeIf true the provided time is in the local timezone, if false it is in UTC
TitleThe title of the notification
BodyThe more detailed description of the notification
ActionThe text to be displayed on the slider controller
ActivationEventA string that is passed in the delegate callback when the app is brought into the foreground from the user activating the notification
IdOverrideA int that is passed to pin the notification to an Id. By doing this it will only show the latest notification sent from that ID.
Returns
A unique identifier used to cancel the notification

Implemented in FAndroidLocalNotificationService, and FIOSLocalNotificationService.

◆ ScheduleLocalNotificationBadgeAtTime()

virtual int32 ILocalNotificationService::ScheduleLocalNotificationBadgeAtTime ( const FDateTime FireDateTime,
bool  LocalTime,
const FString &  ActivationEvent 
)
pure virtual

Schedule a local notification badge at a specific time, inLocalTime specifies the current local time or if UTC time should be used

Parameters
FireDateTimeThe time at which to fire the local notification
LocalTimeIf true the provided time is in the local timezone, if false it is in UTC
ActivationEventA string that is passed in the delegate callback when the app is brought into the foreground from the user activating the notification
Returns
A unique identifier used to cancel the notification

Implemented in FAndroidLocalNotificationService, and FIOSLocalNotificationService.

◆ SetLaunchNotification()

virtual void ILocalNotificationService::SetLaunchNotification ( FString const &  ActivationEvent,
int32  FireDate 
)
pure virtual

Set the local notification that was used to launch the app

Parameters
ActivationEventReturns the name of the ActivationEvent if a notification was used to launch the app
FireDateReturns the time the notification was activated

Implemented in FAndroidLocalNotificationService, and FIOSLocalNotificationService.


The documentation for this class was generated from the following file: