Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. iOS
  4. GPS background tracking app

GPS background tracking app

Scheduled Pinned Locked Moved iOS
csharpmobilecomquestionannouncement
4 Posts 3 Posters 13 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Super Lloyd
    wrote on last edited by
    #1

    Here, at work, I am working on an app which (attempt to) track user location in the background. (Using C# and Xamarin / MonoTouch) I tried to enable background tracking with the 3 following steps: 1. I updated the info.plist to have: BackgroundMode-On (Location Update, Background Fetch) 2. in my AppDelegate, call UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(Interval.TotalSeconds); 3. Also register location change with location manager:

    static CLLocationManager LocMgr = new CLLocationManager();
    // ...
    LocMgr.RequestAlwaysAuthorization();
    if (CLLocationManager.LocationServicesEnabled)
    {
    LocMgr.StartMonitoringSignificantLocationChanges();
    LocMgr.LocationsUpdated += LocationsUpdated;
    }

    However, despite all of that, in a whole night I only get 10 update (Interval is set to 1 minute!!!) And I also went for a 10 minutes walk and I didn't get a single update! Any clue on what I could be missing? Cheers! :-D

    A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

    S A I 3 Replies Last reply
    0
    • S Super Lloyd

      Here, at work, I am working on an app which (attempt to) track user location in the background. (Using C# and Xamarin / MonoTouch) I tried to enable background tracking with the 3 following steps: 1. I updated the info.plist to have: BackgroundMode-On (Location Update, Background Fetch) 2. in my AppDelegate, call UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(Interval.TotalSeconds); 3. Also register location change with location manager:

      static CLLocationManager LocMgr = new CLLocationManager();
      // ...
      LocMgr.RequestAlwaysAuthorization();
      if (CLLocationManager.LocationServicesEnabled)
      {
      LocMgr.StartMonitoringSignificantLocationChanges();
      LocMgr.LocationsUpdated += LocationsUpdated;
      }

      However, despite all of that, in a whole night I only get 10 update (Interval is set to 1 minute!!!) And I also went for a 10 minutes walk and I didn't get a single update! Any clue on what I could be missing? Cheers! :-D

      A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

      S Offline
      S Offline
      Super Lloyd
      wrote on last edited by
      #2

      Never mind, I found a post on Xamarin! Walkthrough - Using Background Location - Xamarin[^] I have a feeling it's gotta work!

      A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

      1 Reply Last reply
      0
      • S Super Lloyd

        Here, at work, I am working on an app which (attempt to) track user location in the background. (Using C# and Xamarin / MonoTouch) I tried to enable background tracking with the 3 following steps: 1. I updated the info.plist to have: BackgroundMode-On (Location Update, Background Fetch) 2. in my AppDelegate, call UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(Interval.TotalSeconds); 3. Also register location change with location manager:

        static CLLocationManager LocMgr = new CLLocationManager();
        // ...
        LocMgr.RequestAlwaysAuthorization();
        if (CLLocationManager.LocationServicesEnabled)
        {
        LocMgr.StartMonitoringSignificantLocationChanges();
        LocMgr.LocationsUpdated += LocationsUpdated;
        }

        However, despite all of that, in a whole night I only get 10 update (Interval is set to 1 minute!!!) And I also went for a 10 minutes walk and I didn't get a single update! Any clue on what I could be missing? Cheers! :-D

        A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

        A Offline
        A Offline
        areenamichael
        wrote on last edited by
        #3

        Great information you have share with us. Thank ypu for this. ioS App Developers

        1 Reply Last reply
        0
        • S Super Lloyd

          Here, at work, I am working on an app which (attempt to) track user location in the background. (Using C# and Xamarin / MonoTouch) I tried to enable background tracking with the 3 following steps: 1. I updated the info.plist to have: BackgroundMode-On (Location Update, Background Fetch) 2. in my AppDelegate, call UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(Interval.TotalSeconds); 3. Also register location change with location manager:

          static CLLocationManager LocMgr = new CLLocationManager();
          // ...
          LocMgr.RequestAlwaysAuthorization();
          if (CLLocationManager.LocationServicesEnabled)
          {
          LocMgr.StartMonitoringSignificantLocationChanges();
          LocMgr.LocationsUpdated += LocationsUpdated;
          }

          However, despite all of that, in a whole night I only get 10 update (Interval is set to 1 minute!!!) And I also went for a 10 minutes walk and I didn't get a single update! Any clue on what I could be missing? Cheers! :-D

          A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

          I Offline
          I Offline
          Irikamehta
          wrote on last edited by
          #4

          Do you want to engage your users effectively through a scalable and powerful app? And Looking for the best Android app development company to build a powerful app for your business? If yes, then Antier Solutions is the perfect place for you. We have a professional team of Android app developers who create versatile, user-friendly, and flexible applications. We work closely with the clients to understand their requirements and suggest them, cost-effective, scalable, and robust mobile solutions. If you want to break boundaries with your project, come to us and we turn your ideas into wonderful apps. To know more about services, visit our website https://antiersolutions.com/mobile-app-development.html.
          Email ID : Info@antiersolutions.com

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups