Error is :
Assets\Scripts\AndroidNotificationsHandler.cs(11,38): error CS0246: The type or namespace name ‘Datetime’ could not be found (are you missing a using directive or an assembly reference?)
Please Tell me how can i solve this issue please help me:
My Code is :
using System;
using System.Collections;
using System.Collections.Generic;
using Unity.Notifications.Android;
using UnityEngine;
public class AndroidNotificationsHandler : MonoBehaviour
{
private const string ChannelId = "notification_channel";
public void ScheduleNotification(Datetime datetime)
{
AndroidNotificationChannel notificationChannel = new AndroidNotificationChannel
{
Id = ChannelId,
Name = "Notification Channel",
Description = "Some random description",
Importance = Importance.Default
};
AndroidNotificationCenter.RegisterNotificationChannel(notificationChannel);
AndroidNotification notification = new AndroidNotification
{
Title = "Energy Recharged!",
Text = "Your energy has recharged, come back to play again!",
SmallIcon = "default",
LargeIcon = "default",
FireTime = System.datetime
};
AndroidNotificationCenter.SendNotification(notification, ChannelId);
}
}