コード例 #1
0
        public DroidAnalyticsService(AIConfiguration configuration)
        {
            _Telemetry = new TelemetryClient {
                InstrumentationKey = configuration.InstrumentationKey
            };

            var version = new AppVersionImpl();

#if DEBUG
            TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode = true;
#endif
            _Telemetry.Context.Device.OperatingSystem = $"Android {Build.VERSION.SdkInt} ({Build.VERSION.Release})";
            _Telemetry.Context.GlobalProperties.Add("&aid", configuration.AppId);
            _Telemetry.Context.GlobalProperties.Add("&an", configuration.AppName);
            _Telemetry.Context.GlobalProperties.Add("&av", version.Version);
        }
コード例 #2
0
        public iOSAnalyticsService(AIConfiguration configuration)
        {
            _Telemetry = new TelemetryClient {
                InstrumentationKey = configuration.InstrumentationKey
            };

            var version = new AppVersionImpl();

#if DEBUG
            TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode = true;
#endif
            _Telemetry.Context.Device.OperatingSystem = $"iOS {UIDevice.CurrentDevice.SystemVersion}";
            _Telemetry.Context.GlobalProperties.Add("&aid", configuration.AppId);
            _Telemetry.Context.GlobalProperties.Add("&an", configuration.AppName);
            _Telemetry.Context.GlobalProperties.Add("&av", version.Version);
        }