unreal.PlatformLibrary

class unreal.PlatformLibrary(outer=None, name='None')

Bases: unreal.BlueprintFunctionLibrary

Blueprint Platform Library

C++ Source:

  • Module: Engine

  • File: BlueprintPlatformLibrary.h

classmethod cancel_local_notification(activation_event) None

Cancel a local notification given the ActivationEvent

Parameters

activation_event (str) – The string passed into the Schedule call for the notification to be cancelled

classmethod cancel_local_notification_by_id(notification_id) None

Cancel a local notification given the ActivationEvent

Parameters

notification_id (int32) – The Id returned from one of the ScheduleLocalNotification* functions

classmethod clear_all_local_notifications() None

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

classmethod get_device_orientation() ScreenOrientation
Returns

the current device orientation

Return type

ScreenOrientation

classmethod get_launch_notification() -> (notification_launched_app=bool, activation_event=str, fire_date=int32)

Get the local notification that was used to launch the app

Returns

notification_launched_app (bool): Return true if a notification was used to launch the app

activation_event (str): Returns the name of the ActivationEvent if a notification was used to launch the app

fire_date (int32): Returns the time the notification was activated

Return type

tuple

classmethod schedule_local_notification_at_time(fire_date_time, local_time, title, body, action, activation_event) int32

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

Parameters
  • fire_date_time (DateTime) – The time at which to fire the local notification

  • local_time (bool) – If true the provided time is in the local timezone, if false it is in UTC

  • title (Text) – The title of the notification

  • body (Text) – The more detailed description of the notification

  • action (Text) – The text to be displayed on the slider controller

  • activation_event (str) – A string that is passed in the delegate callback when the app is brought into the foreground from the user activating the notification

Return type

int32

classmethod schedule_local_notification_badge_at_time(fire_date_time, local_time, activation_event) int32

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

Parameters
  • fire_date_time (DateTime) – The time at which to fire the local notification

  • local_time (bool) – If true the provided time is in the local timezone, if false it is in UTC

  • activation_event (str) – A string that is passed in the delegate callback when the app is brought into the foreground from the user activating the notification

Return type

int32

classmethod schedule_local_notification_badge_from_now(in_seconds_from_now, activation_event) None

Schedule a local notification badge to fire inSecondsFromNow from now

Parameters
  • in_seconds_from_now (int32) – The seconds until the notification should fire

  • activation_event (str) – A string that is passed in the delegate callback when the app is brought into the foreground from the user activating the notification

classmethod schedule_local_notification_from_now(in_seconds_from_now, title, body, action, activation_event) int32

Schedule a local notification to fire inSecondsFromNow from now

Parameters
  • in_seconds_from_now (int32) – The seconds until the notification should fire

  • title (Text) – The title of the notification

  • body (Text) – The more detailed description of the notification

  • action (Text) – The text to be displayed on the slider controller

  • activation_event (str) – A string that is passed in the delegate callback when the app is brought into the foreground from the user activating the notification

Return type

int32