protected virtual void InitialiseOneSignalService()
        {
            // Initialise One Signal service
            OneSignalServiceSettings _oneSignalSettings = NPSettings.AddonServicesSettings.OneSignalService;

            OneSignal.Init(_oneSignalSettings.AppID,
                           _oneSignalSettings.GoogleProjectNumber,
                           DidReceiveOneSignalNotification,
                           false);
        }
Example #2
0
        private void InitialiseOneSignalService()
        {
            OneSignalServiceSettings _settings = NPSettings.AddonServicesSettings.OneSignalService;

            OneSignal.StartInit(appID: _settings.AppID, googleProjectNumber: _settings.GoogleProjectNumber)
            .HandleNotificationReceived(DidReceiveOneSignalNotification)
            .InFocusDisplaying(OneSignal.OSInFocusDisplayOption.None)
            .Settings(new Dictionary <string, bool>()
            {
                { OneSignal.kOSSettingsAutoPrompt, false }
            })
            .EndInit();
        }