Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity notification

//install "Mobile Notification" Asset
using Unity.Notifications.Android; //header for notification

public class Notification : MonoBehaviour
{
    public void NotificationSend()
    {
        AndroidNotificationChannel channelName = new AndroidNotificationChannel()
        {
            Id = "IdName",
            Name = "Default Channel",
            Importance = Importance.Default,
            Description = "Any discription",
        };
        AndroidNotificationCenter.RegisterNotificationChannel(channelName);

        Unity.Notifications.Android.AndroidNotification notificationName = new Unity.Notifications.Android.AndroidNotification
        {
            Title = "Notification Header",
            Text = "Notification Description",
            SmallIcon = "default",
            LargeIcon = "default",
            FireTime = System.DateTime.Now
        };

        AndroidNotificationCenter.SendNotification(notificationName, "IdName");
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: convert decimal to 2 decimal places c# 
Csharp :: unity camera follow with lerp 
Csharp :: c# even or odd 
Csharp :: subtract days c# 
Csharp :: c# struct 
Csharp :: how get data from json in c# 
Csharp :: while c# 
Csharp :: print all complete object in list c# 
Csharp :: c# picturebox transparente 
Csharp :: get unique array based on value in c# 
Csharp :: Edit file C# 
Csharp :: get selected item datagrid wpf 
Csharp :: c# regex find last match 
Csharp :: create new .net core project visual studio 
Csharp :: Reverse Coding Challenge 1 
Csharp :: what is unity 
Csharp :: assembly project name c# .net 
Csharp :: c# function 
Csharp :: Map Range Clamped unity 
Csharp :: how to find player gameobject in unity 
Csharp :: to list c# 
Csharp :: how to generate a random number in c# 
Csharp :: c# recursion formula for the factorial 
Csharp :: what is list in c# 
Csharp :: c# sftp 
Csharp :: longest substring without repeating characters leetcode 
Csharp :: cast from object to generic type c# 
Csharp :: cmd move directory to another directory 
Csharp :: loop for x amount of seconds c# 
Csharp :: how-to-add-new-column-with-value-to-the-existing-datatable 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =