docs.unity3d.com
    Show / Hide Table of Contents

    Interface IGameNotificationsPlatform<TNotificationType>

    Any type that handles notifications for a specific game platform.

    Inherited Members
    IGameNotificationsPlatform.NotificationReceived
    IGameNotificationsPlatform.ScheduleNotification(IGameNotification)
    IGameNotificationsPlatform.CancelNotification(Int32)
    IGameNotificationsPlatform.DismissNotification(Int32)
    IGameNotificationsPlatform.CancelAllScheduledNotifications()
    IGameNotificationsPlatform.DismissAllDisplayedNotifications()
    IGameNotificationsPlatform.OnForeground()
    IGameNotificationsPlatform.OnBackground()
    Namespace: NotificationSamples
    Syntax
    public interface IGameNotificationsPlatform<TNotificationType> : IGameNotificationsPlatform where TNotificationType : IGameNotification
    Type Parameters
    Name Description
    TNotificationType

    The type of notification returned by this platform.

    Remarks

    Has a concrete notification type

    Methods

    CreateNotification()

    Create an instance of TNotificationType.

    Declaration
    TNotificationType CreateNotification()
    Returns
    Type Description
    TNotificationType

    A new platform-appropriate notification object.

    GetLastNotification()

    Use this to retrieve the last local or remote notification of TNotificationType received by the app.

    Declaration
    TNotificationType GetLastNotification()
    Returns
    Type Description
    TNotificationType

    Returns new platform-appropriate notification object for the last local or remote notification used to open the app or clicked on by the user. If no notification is available it returns null.

    Remarks

    On Android the last notification is not cleared until the application is explicitly quit.

    ScheduleNotification(TNotificationType)

    Schedule a notification to be delivered.

    Declaration
    void ScheduleNotification(TNotificationType notification)
    Parameters
    Type Name Description
    TNotificationType notification

    The notification to deliver.

    Exceptions
    Type Condition
    ArgumentNullException

    notification is null.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023