docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method SendNotification

    SendNotification(AndroidNotification, string)

    Schedule a notification which will be shown at the time specified in the notification struct. The returned id can later be used to update the notification before it's triggered, it's current status can be tracked using CheckScheduledNotificationStatus.

    Declaration
    public static int SendNotification(AndroidNotification notification, string channelId)
    Parameters
    Type Name Description
    AndroidNotification notification

    Data for the notification

    string channelId

    ID of the channel to send notification to

    Returns
    Type Description
    int

    The generated ID for the notification

    SendNotification(AndroidJavaObject)

    Schedule a notification created using the provided Notification.Builder object. Notification builder should be created by calling CreateNotificationBuilder.

    Declaration
    public static void SendNotification(AndroidJavaObject notificationBuilder)
    Parameters
    Type Name Description
    AndroidJavaObject notificationBuilder

    SendNotification(AndroidJavaObject, out int)

    Schedule a notification created using the provided Notification.Builder object. Notification builder should be created by calling CreateNotificationBuilder. Stores the notification id to the second argument

    Declaration
    public static void SendNotification(AndroidJavaObject notificationBuilder, out int id)
    Parameters
    Type Name Description
    AndroidJavaObject notificationBuilder
    int id
    In This Article
    Back to top
    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