Expo location stop alone 5 min later

I all
I have running the basic code of geolocation in one screen, all fine, but 5 or 6 mins later the position not update more, i try to see if the app crash, but the app is running, the only think is that, the update coordenates stop to run. I have to turn off a run again.
But this issue not can by.
What can do?
I try one or two trick, but in the end i have the same issue.
Thank

1 Like

Hi i have the same problem.
The background task is automatically stopped after about 5min…

I have the same issue

please notice that nobody in this thread has provided any code or even said what platform they are having issues with… if you think you have found a bug, please share some information so people can help you :wink:

This is the task that is running in the background but after 5 min or less stop sending location.

TaskManager.defineTask(LOCATION_TASK_NAME,  ({ data, error }) => {

    if (error) {

        console.log(error)

      // Error occurred - check `error.message` for more details.

      return;

    }

    if (data) {

      const { locations } = data;

  

   
       LocationAPI.sendCurrentLocation(locations[0].coords).then( res=>{


        console.log(res)

        console.log("Se esta enviando")

      }).catch(err=>{

      console.log(err)

      console.log("en el task")

      })

     })

 

    
   

      // do something with the locations captured in the background

    }

  });

Thanks for update and quick reply, I’ll be sure to keep an eye on this thread. Looking for the same issue.

OneVanilla Card

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.