private void StopTrackingThread()
 {
     SystemLogger.Log(SystemLogger.Module.PLATFORM, "Stopping Webtrekk Tracking");
     if (this._tracker != null)
     {
         UIApplication.SharedApplication.InvokeOnMainThread(delegate {
             try{
                 this._tracker.EndSession();
                 SystemLogger.Log(SystemLogger.Module.PLATFORM, "Webtrekk Tracking STOPPED");
                 this._tracker.Dispose();
                 this._tracker = null;
             } catch (Exception e) {
                 SystemLogger.Log(SystemLogger.Module.PLATFORM, "Error stopping session", e);
             }
         });
     }
 }
        private Webtrekk.Webtrekk SharedTracker(string webServerUrl, string trackId, string samplingRate)
        {
            if (this._tracker == null && webServerUrl != String.Empty && trackId != String.Empty && samplingRate != String.Empty)
            {
                UIApplication.SharedApplication.InvokeOnMainThread(delegate {
                    try {
                        this._tracker = Webtrekk.Webtrekk.webtrekkWithServerUrl(webServerUrl, trackId, samplingRate);
                        SystemLogger.Log(SystemLogger.Module.PLATFORM, "Tracking STARTED for account: " + webServerUrl);
                        if (this._tracker == null)
                        {
                            SystemLogger.Log(SystemLogger.Module.PLATFORM, "*** Instance returned by Webtrekk is NULL. Please check your assembly linking");
                        }
                    } catch (Exception e) {
                        SystemLogger.Log(SystemLogger.Module.PLATFORM, "Error getting Webtrekk tracker with server url", e);
                    }
                });
            }

            return(this._tracker);
        }
Esempio n. 3
0
 private void StopTrackingThread()
 {
     SystemLogger.Log(SystemLogger.Module.PLATFORM, "Stopping Webtrekk Tracking");
     if (this._tracker != null) {
         UIApplication.SharedApplication.InvokeOnMainThread (delegate {
             try{
                 this._tracker.EndSession();
                 SystemLogger.Log(SystemLogger.Module.PLATFORM, "Webtrekk Tracking STOPPED");
                 this._tracker.Dispose();
                 this._tracker = null;
             } catch (Exception e) {
                 SystemLogger.Log(SystemLogger.Module.PLATFORM, "Error stopping session", e);
             }
         });
     }
 }
Esempio n. 4
0
        private Webtrekk.Webtrekk SharedTracker(string webServerUrl, string trackId, string samplingRate)
        {
            if(this._tracker == null && webServerUrl!=String.Empty && trackId!=String.Empty && samplingRate!=String.Empty) {
                UIApplication.SharedApplication.InvokeOnMainThread (delegate {
                    try {
                        this._tracker = Webtrekk.Webtrekk.webtrekkWithServerUrl(webServerUrl,trackId, samplingRate);
                        SystemLogger.Log(SystemLogger.Module.PLATFORM, "Tracking STARTED for account: " + webServerUrl);
                        if(this._tracker == null) {
                            SystemLogger.Log(SystemLogger.Module.PLATFORM, "*** Instance returned by Webtrekk is NULL. Please check your assembly linking");
                        }
                    } catch (Exception e) {
                        SystemLogger.Log(SystemLogger.Module.PLATFORM, "Error getting Webtrekk tracker with server url", e);
                    }
                });
            }

            return this._tracker;
        }