public void StartClient(string apiKey, bool isDebugEnabled)
        {
            if (this.scapeClientPtr == IntPtr.Zero)
            {
                int isDebugInt = 0;
                if (isDebugEnabled)
                {
                    isDebugInt = 1;
                }

                this.scapeClientPtr = ScapeNative.citf_createClient(apiKey, isDebugInt);


                if (this.IsStarted())
                {
                    this.scapeSessionNative = new ScapeSessionNative(this.scapeClientPtr);

                    ScapeNative.citf_setClientStateCallbacks(this.scapeClientPtr,
                                                             onAquireMotionMeasurements,
                                                             onAquireLocationMeasurements);

                    if (isDebugEnabled)
                    {
                        this.debugSessionPtr = ScapeNative.citf_getDebugSession(this.scapeClientPtr);

                        debugSession = new DebugSessionNative(debugSessionPtr);
                    }

                    setDeviceInfo();

                    Input.location.Start();
                }
            }
        }
예제 #2
0
        /// <summary>
        /// Apply the debug config options to the DebugSession object
        /// </summary>
        /// <param name="debugSession">
        /// pass in a debugSession to be configured by this config object
        /// </param>
        public void ConfigureDebugSession(DebugSession debugSession)
        {
            debugSession.SetLogConfig(logLevel, logOutput);

            if (debugMockGPS)
            {
                debugSession.MockGPSCoordinates(mockGPSLatLng.Latitude, mockGPSLatLng.Longitude);
            }

            if (saveImages)
            {
                debugSession.SaveImages(saveImages);
            }
        }