Exemple #1
0
 protected override void Load(ContainerBuilder builder)
 {
     base.Load(builder);
     builder.RegisterType <CLLocationManager>();
     builder.RegisterType <CMMotionActivityManager>();
     builder.RegisterType <Localize>().As <ILocalize>().SingleInstance();
     builder.RegisterType <LocationManagerImplementation>().As <ILocationManager>().SingleInstance();
     builder.RegisterType <SensorManagerImplementation>().As <ISensorManager>().SingleInstance();
     builder.RegisterType <ExtraPermission>().As <IExtraPermission>().SingleInstance();
     builder.RegisterType <CMMotionManager>();
     builder.RegisterType <CMPedometer>();
     builder.RegisterInstance(CollectionProfile.GetDefaultProfile().iOSProfile).As <ProfileiOS>();
     builder.RegisterType <DataUploadTask>().As <IDataUploadTask>();
     builder.RegisterType <iOSHelper>().As <IIOSHelper>();
 }
Exemple #2
0
        public static CollectionProfile GetDefaultProfile()
        {
            CollectionProfile cProfile = new CollectionProfile()
            {
                iOSProfile = new ProfileiOS()
                {
                    DistanceDeltaLimitLowTracking = 40,
                    DistanceDeltaLowTracking      = 100,
                    TimePeriodLowTracking         = 60,
                    LowTrackingProfile            = new CoreLocationProfile()
                    {
                        DesiredAccuracy                = 200,
                        MonitorSignificantChanges      = true,
                        AllowDeferredLocationUpdates   = false,
                        AllowBackgroundLocationUpdates = true
                    },
                    HighTrackingProfile = new CoreLocationProfile()
                    {
                        DesiredAccuracy                 = -1,
                        MonitorSignificantChanges       = true,
                        AllowDeferredLocationUpdates    = true,
                        DeferredLocationUpdatesDistance = 1000,
                        DeferredLocationUpdatesTimeout  = 600,
                        AllowBackgroundLocationUpdates  = true,
                    }
                },
                AndroidProfile = new ProfileAndroid()
                {
                    DistanceDeltaLimitLowTracking = 40,
                    DistanceDeltaLowTracking      = 100,
                    TimePeriodLowTracking         = 60,
                    HighTrackingProfile           = new LocationRequestProfile()
                    {
                        Interval = 1000,
                        Priority = 100,
                    },
                    LowTrackingProfile = new LocationRequestProfile()
                    {
                        Interval = 60 * 1000,
                        Priority = 102,
                    }
                }
            };

            return(cProfile);
        }