Ejemplo n.º 1
0
    private void InitializationNotification()//инициализация менеджера
    {
        //ту не обязательно че-та писать в канале, по факту id и описание
        GameNotificationChannel channel = new GameNotificationChannel("Notification", "channel for notification", "Трупоеды трупы ели"); //канал по которому создаеться оповещение

        notificationManager.Initialize(channel);                                                                                         //инициализируем по каналу менеджер
    }
Ejemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        // Get access to the notifications manager
        notificationsManager = GetComponent <GameNotificationsManager>();

        // Create a channel to use for it (required for Android)
        GameNotificationChannel channel = new GameNotificationChannel("channel0",
                                                                      "Default Channel", "Generic Notifications");;


        // Initalize the manager so it can be used.
        notificationsManager.Initialize(channel);

        // Check if the notification hasn't been added yet
        if (!addedReminder)
        {
            // Remind the player to come back tomorrow to play the game
            ShowNotification("Endless Runner",
                             "Come back and try to beat your score!",
                             DateTime.Now.AddDays(1));

            // Cannot be added again until the user comes back
            addedReminder = true;
        }
    }
Ejemplo n.º 3
0
        private void Start()
        {
            // Set up channels (mostly for Android)
            // You need to have at least one of these
            var c1 = new GameNotificationChannel(ChannelId, "Default Game Channel", "Generic notifications");
            var c2 = new GameNotificationChannel(NewsChannelId, "News Channel", "News feed notifications");
            var c3 = new GameNotificationChannel(ReminderChannelId, "Reminder Channel", "Reminder notifications");

            manager.Initialize(c1, c2, c3);
        }
 public void Init()
 {
     if (!inizialized)
     {
         Debug.Log("NotificationService Init");
         var channel = new GameNotificationChannel(ChannelId, "Default Game Channel", "Generic notifications");
         GameNotificationsManager.I.Initialize(channel);
         inizialized = true;
     }
 }
    void Start()
    {
        SetUpMetrics();

#if UNITY_IOS
        notificationManager.Initialize();
        StartCoroutine(StartTrackingGps());
        print("StartTrackingGps() just started");
#elif UNITY_ANDROID
        var channel = new GameNotificationChannel("RiderReminder ", "Rider Reminder Channel", "All notifications");
        notificationManager.Initialize(channel);
#endif

        StartDriveNotification();
    }
Ejemplo n.º 6
0
        private void Start()
        {
            if (SettingsManager.GetTutorialState() && (GameSettings.NewGame) || (!GameSettings.NewGame && SaveGameSystem.Instance.GetCurrentSaveGame().TutorialStage > 0))
            {
                Instantiate(TutorialPrefab);
                TutorialState.Enter();
            }
            else
            {
                GameTime.GameTime.Instance.StartGame();
            }

            if (SettingsManager.GetGameTime() == SettingsManager.GameTimeMode.Realtime)
            {
                cancelNotifications();
            }

            var channel = new GameNotificationChannel("1", "Default Game Channel", "Generic notifications");

            NotificationsManager.Initialize(channel);
        }
Ejemplo n.º 7
0
    private void InitializeNotifications()
    {
        GameNotificationChannel channel = new GameNotificationChannel("Identificator", "Title", "Description");

        notificationsManager.Initialize(channel);
    }
Ejemplo n.º 8
0
 private void CreateNotificationChannelSecondVer()   /// Рабочая версия
 {
     notificationChannelSecondVer = new GameNotificationChannel("default_channel", "Default Channel", "Generic notifications");
     gameNotificationManager.Initialize(notificationChannelSecondVer);
 }
Ejemplo n.º 9
0
    private void InitializeNotifications()
    {
        GameNotificationChannel channel = new GameNotificationChannel("ComeBack", "name", "description", GameNotificationChannel.NotificationStyle.Default);

        notificationsManager.Initialize(channel);
    }
Ejemplo n.º 10
0
    private void InitializeGameChannel()
    {
        var channel = new GameNotificationChannel(NOTIFICATION_CHANNEL_ID, GAME_NOTIFICATION_CHANNEL_TITLE, GAME_NOTIFICATION_CHANNEL_DESCRIPTION);

        manager.Initialize(channel);
    }