Пример #1
0
        public ViewController(IntPtr handle) : base(handle)
        {
            _testBkgdDownloadTask              = new TestBkgdDownloadTask();
            _testBkgdLocation                  = new TestBkgdLocationUpdates();
            _testBkgdLocation.LocationUpdated += (object sender,
                                                  LocationUpdatedEventArgs e) =>
            {
                Console.WriteLine(e.Location);
                var latString = e.Location.Coordinate.Latitude.ToString(".00000");
                var lngString = e.Location.Coordinate.Longitude.ToString(".000000");
                LocationLabel.Text = $"{latString} - {lngString}";
            };

            var sessionConfiguration = NSUrlSessionConfiguration
                                       .CreateBackgroundSessionConfiguration("com.monojit.development.session.config");

            _backgroundSession = NSUrlSession.FromConfiguration(sessionConfiguration,
                                                                new BackgroundSessionDelegate(),
                                                                new NSOperationQueue());
        }
 public TestIntentService() : base("com.monojit.development.TestIntentServie")
 {
     _testBkgdDownloadTask = new TestBkgdDownloadTask();
 }