Exemplo n.º 1
0
        protected void BeginSession()
        {
            Log("Start session");
            if (canReceivePush)
            {
                gcm.Init(GCMProjectNumber);
            }

            StringBuilder builder = InitConnectionDataStringBuilder();

            // compute metrics
            _deviceInfo.JSONSerializeMetrics(builder);
            string metricsString = builder.ToString();

            builder = InitConnectionData(_deviceInfo);

            builder.Append("&sdk_version=");
            AppendConnectionData(builder, SDK_VERSION);

            builder.Append("&begin_session=1");

            builder.Append("&metrics=");
            AppendConnectionData(builder, metricsString);

            ConnectionQueue.Enqueue(builder.ToString());
            ProcessConnectionQueue();
        }
Exemplo n.º 2
0
        protected void BeginSession()
        {
            DeviceInfo    info    = GetDeviceInfo();
            StringBuilder builder = InitConnectionDataStringBuilder();

            // compute metrics
            info.JSONSerializeMetrics(builder);
            string metricsString = builder.ToString();

            builder = InitConnectionData(info);

            builder.Append("&sdk_version=");
            AppendConnectionData(builder, SDK_VERSION);

            builder.Append("&begin_session=1");

            builder.Append("&metrics=");
            AppendConnectionData(builder, metricsString);

            ConnectionQueue.Enqueue(builder.ToString());
            ProcessConnectionQueue();
        }