title: react-native-geolocation-service and HeadLess JS
body: <p>I have a HeadLess JS task running and getting the current user location using the react-native-geolocation-service api. It works fine while app is in foreground, but as soon as i change it to background the api returns an error: message:Location request timed out.
  code:3.</p>
  <p>I have triend many solutions, from setting enableHighAccuracy to false, deleting the other properties and nothing changes.</p>
  <p>Is there anyone who can help me solve this problem?</p>
  <pre><code>export const getCurrentPosition =
    async (): Promise&lt;GeolocationPosition&gt; =&gt; {
      return new Promise((resolve, reject) =&gt; {
        Geolocation.getCurrentPosition(
          (position) =&gt; {
            const {
              coords: { latitude, longitude },
            } = position;
  
            resolve({ latitude, longitude });
          },
          (error) =&gt; {
            // See error code charts below.
            console.debug(error.code, error.message);
            reject();
          },
          {
            enableHighAccuracy: true,
            timeout: 15000,
            maximumAge: 10000,
          },
        );
      });
    };
  </code></pre>