コード例 #1
0
    private void Start()
    {
        var client = UM_NotificationCenter.Client;

        m_RequestAuthorization.onClick.AddListener(() =>
        {
            client.RequestAuthorization(UM_DialogsUtility.DisplayResultMessage);
        });

        m_Create5SecNotification.onClick.AddListener(() => { CreateNotificationWithInterval(5); });
        m_Create20SecNotification.onClick.AddListener(() => { CreateNotificationWithInterval(20); });

        m_RemoveDelivered.onClick.AddListener(() =>
        {
            client.RemoveAllDeliveredNotifications();
        });

        m_RemovePending.onClick.AddListener(() =>
        {
            client.RemoveAllPendingNotifications();
        });

        m_CloseApp.onClick.AddListener(Application.Quit);

        m_ToBackground.onClick.AddListener(() => { UM_Application.SendToBackground(); });

        iOSOnlySetup();
        AndroidOnlySetup();
    }
コード例 #2
0
    private void Start()
    {
        var client = UM_NotificationCenter.Client;

        m_Create5SecNotification.onClick.AddListener(() => { CreateNotificationWithInterval(5); });
        m_Create20SecNotification.onClick.AddListener(() => { CreateNotificationWithInterval(20); });

        m_RemoveDelivered.onClick.AddListener(() =>
        {
            client.RemoveAllDeliveredNotifications();
        });

        m_RemovePending.onClick.AddListener(() =>
        {
            client.RemoveAllPendingNotifications();
        });

        m_CloseApp.onClick.AddListener(Application.Quit);

        m_ToBackground.onClick.AddListener(() => { UM_Application.SendToBackground(); });

        m_LargeImageStyle.onClick.AddListener(AndroidBigPictureStyle);
        m_LargeTextStyle.onClick.AddListener(AndroidBigTextStyle);
    }