Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
How to listen for location for realtime in react native

I am working on a location tracking application, I am prompting an error message when users are off their location. Implemented functionality working but I face one problem when the user turns off location from the top menu of the mobile app it not working but when I close an app it worked ( it the bacause I am using react native app state to check app is foreground or in the background ). What I want to achieve when users are off their location I want to listen realtime when location off I want to prompt message direct.

Here is implemented functionality

const _handleAppStateChange = async (nextAppState) => {
    console.log("22 app", appState);
    if (
      appState.current.match(/inactive|background/) &&
      nextAppState === "active"
    ) {
      getCurrentUserLocation();
    }
    appState.current = nextAppState;
    setAppStateVisible(appState.current);
  };
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!