static void PlatformStart(string appSecret, params Type[] services) { string parsedSecret; try { parsedSecret = GetSecretAndTargetForPlatform(appSecret, PlatformIdentifier); } catch (AppCenterException ex) { AppCenterLog.Assert(AppCenterLog.LogTag, ex.Message); return; } AndroidAppCenter.Start(SetWrapperSdkAndGetApplication(), parsedSecret, GetServices(services)); }
// Internal for testing internal void InstanceConfigure(string appSecretOrSecrets) { if (_instanceConfigured) { AppCenterLog.Warn(AppCenterLog.LogTag, "App Center may only be configured once."); return; } _appSecret = GetSecretForPlatform(appSecretOrSecrets, PlatformIdentifier); // If a factory has been supplied, use it to construct the channel group - this is designed for testing. _networkStateAdapter = new NetworkStateAdapter(); _channelGroup = _channelGroupFactory?.CreateChannelGroup(_appSecret) ?? new ChannelGroup(_appSecret, null, _networkStateAdapter); _channel = _channelGroup.AddChannel(ChannelName, Constants.DefaultTriggerCount, Constants.DefaultTriggerInterval, Constants.DefaultTriggerMaxParallelRequests); if (_logUrl != null) { _channelGroup.SetLogUrl(_logUrl); } _instanceConfigured = true; AppCenterLog.Assert(AppCenterLog.LogTag, "App Center SDK configured successfully."); }