docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NotificationSettings.AndroidSettings

    Class used to access Android-specific notification settings.

    Inheritance
    object
    NotificationSettings.AndroidSettings
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Notifications
    Assembly: solution.dll
    Syntax
    public static class NotificationSettings.AndroidSettings

    Properties

    CustomActivityString

    The full class name of the activity that you wish to be assigned to the notification.

    Declaration
    public static string CustomActivityString { get; set; }
    Property Value
    Type Description
    string

    ExactSchedulingOption

    A set of flags indicating whether to use exact scheduling and add supporting permissions.

    Declaration
    public static AndroidExactSchedulingOption ExactSchedulingOption { get; set; }
    Property Value
    Type Description
    AndroidExactSchedulingOption

    RescheduleOnDeviceRestart

    By default AndroidSettings removes all scheduled notifications when the device is restarted. Enable this to automatically reschedule all non expired notifications when the device is turned back on.

    Declaration
    public static bool RescheduleOnDeviceRestart { get; set; }
    Property Value
    Type Description
    bool

    UseCustomActivity

    Enable this if you want to override the activity which will opened when the user click on the notification. By default activity assigned to com.unity3d.player.UnityPlayer.currentActivity will be used.

    Declaration
    public static bool UseCustomActivity { get; set; }
    Property Value
    Type Description
    bool

    Methods

    AddDrawableResource(string, Texture2D, NotificationIconType)

    Add image to notification settings.

    Declaration
    public static void AddDrawableResource(string id, Texture2D image, NotificationIconType type)
    Parameters
    Type Name Description
    string id

    Image identifier

    Texture2D image

    Image texture, must be obtained from asset database

    NotificationIconType type

    Image type

    ClearDrawableResources()

    Remove all images from notification settings.

    Declaration
    public static void ClearDrawableResources()

    RemoveDrawableResource(int)

    Remove icon at given index from notification settings.

    Declaration
    public static void RemoveDrawableResource(int index)
    Parameters
    Type Name Description
    int index

    Index of image to remove

    RemoveDrawableResource(string)

    Remove icon with given identifier from notification settings.

    Declaration
    public static void RemoveDrawableResource(string id)
    Parameters
    Type Name Description
    string id

    ID of the image to remove

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)