Code Monkey home page Code Monkey logo

Comments (3)

mrousavy avatar mrousavy commented on May 24, 2024 1

Well it does start updating location, but the initial value is set to the cached value. It should give an update within the first 5 seconds of running, does that never happen? Or is 5 seconds just too slow for your usecase?

from react-native-vision-camera.

idrisssakhi avatar idrisssakhi commented on May 24, 2024

yes, it does update the location after a while, didn't measure the time. Any way, in my use case I need to get the real actual location. I used exify for android to write metadata directly. if it's a lot of time to improve we can close this, i think there are more important issues than this

from react-native-vision-camera.

mrousavy avatar mrousavy commented on May 24, 2024

Can you maybe help debug this a bit? I'm not sure what values I need to put in here:

Log.i(TAG, "Start updating location...")
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, UPDATE_INTERVAL_MS, UPDATE_DISTANCE_M, this)
this.location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER)

Currently those values are:

  • UPDATE_INTERVAL_MS = 5000L (= 5 seconds)
  • UPDATE_DISTANCE_M = 5f (= 5 meters)

..aren't that reasonable values?
If I set both to 0 it will stream location quite aggressively, no?

There is also a method to imperatively get the current location (LocationManager.getCurrentLocation) but this is API level 30+.

from react-native-vision-camera.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.