# Notification Manager

## How it's work

namespace **`using Game.Core;`**

It inits in AppStart.cs in Start(). Object with script replaced in \_Loader scene. \
Manager schedules notifications by **`SendScheduledNotification_GameReturn(`**<mark style="color:red;">**here will be fire delays and hours args**</mark>**`)`** function.\
You need to change fire delays and hours args if you want in that function by script edit.

In init it will schedule notifications. No more functionality yet.

{% hint style="danger" %}
You must setup some field for every game if you want to use notifications.\
You can find all that you need to change by todo list in Visual Studio or other IDE.\
\
code below what you need to change:
{% endhint %}

<pre class="language-csharp"><code class="lang-csharp">// todo: NOTIFICATION change title, text, icon and etc!
<strong>private NotificationData[] gameReturnNotifications = new NotificationData[] {
</strong>    new NotificationData() { 
            Title = "Figures are waiting!", 
            Text = "Figures are waiting for you!", 
            HasIcons = true, 
            // <a data-footnote-ref href="#user-content-fn-1">how to setup icons</a>
            SmallIcon = "figure_square", 
            LargeIcon = "figure_square_large" 
    },
};

// todo: NOTIFICATION change waitDaysCount, fireHourFirst, 
// fireHourSecond, repeatIntervalDays default params
private void SendScheduledNotification_GameReturn(
        int waitDaysCount = 2, int fireHourFirst = 12,
        int fireHourSecond = 18, int repeatIntervalDays = 1);
</code></pre>

Last function in code above is core setup of scheduled notifications, their invoke time.

[^1]: You can set a custom icon as a small icon to display for each notification.&#x20;

    If you don't specify any small icons, notifications will display the default application icon instead. You can optionally set a large icon which also displays in the notification drawer.&#x20;

    You can configure icons in the notification settings; \
    for more information, see [Notification Settings](https://docs.unity3d.com/Packages/com.unity.mobile.notifications@2.0/manual/Settings.html#custom-icons).
