/** * Register a new listener that will receive geolocation events. * * @param listener to be registered. * @since v2.0 */ public void AddGeolocationListener(IGeolocationListener listener) { // Start logging elapsed time. long tIn = TimerUtil.CurrentTimeMillis(); ILogging logger = AppRegistryBridge.GetInstance().GetLoggingBridge(); if (logger != null) { logger.Log(ILoggingLogLevel.Debug, this.apiGroup.ToString(), "GeolocationBridge executing addGeolocationListener..."); } if (this._delegate != null) { this._delegate.AddGeolocationListener(listener); if (logger != null) { logger.Log(ILoggingLogLevel.Debug, this.apiGroup.ToString(), "GeolocationBridge executed 'addGeolocationListener' in " + (TimerUtil.CurrentTimeMillis() - tIn) + "ms."); } } else { if (logger != null) { logger.Log(ILoggingLogLevel.Error, this.apiGroup.ToString(), "GeolocationBridge no delegate for 'addGeolocationListener'."); } } }
public void Initialize() { _listener = Singleton.Resolve <IGeolocationListener>(); }
public void AddGeolocationListener(IGeolocationListener listener) { _geolocationListener = listener; }