Giter VIP home page Giter VIP logo

Comments (6)

nickfox avatar nickfox commented on July 17, 2024

Can you possibly run the android app on your phone while using Android Studio and log how often gps data is sent (using logcat). This is a new one on me...

Logging is enabled on line 151 of this file:

https://github.com/nickfox/GpsTracker/blob/master/phoneClients/android/app/src/main/java/com/websmithing/gpstracker/LocationService.java

from gpstracker.

endl3ssx avatar endl3ssx commented on July 17, 2024

I did run the logs, here is my output:

11-10 09:10:38.581 4796-4796/com.websmithing.gpstracker D/GpsTrackerActivity: startAlarmManager
11-10 09:14:05.351 4796-4796/com.websmithing.gpstracker D/LocationService: startTracking
11-10 09:14:05.401 4796-4796/com.websmithing.gpstracker D/LocationService: onConnected
11-10 09:14:09.261 4796-4796/com.websmithing.gpstracker E/LocationService: position: 46.7594925, 23.5924466 accuracy: 27.737
11-10 09:14:09.921 4796-4796/com.websmithing.gpstracker V/AsyncHttpRH: Progress 19 from 19 (100%)
11-10 09:14:09.921 4796-4796/com.websmithing.gpstracker D/LocationService: URL
11-10 09:14:09.921 4796-4796/com.websmithing.gpstracker E/LocationService: sendLocationDataToWebsite - success

As you can see, the AlarmManager was started at 09:10, and the startTracking and subsequent calls only happened at 09:14. Keep in mind that I have 1 minute intervals selected in my app.
I have no idea, the code looks perfect from my standpoint, don't really know what the issue could be.

P.S.: I replaced my URL with 'URL' in this post because it was too long

from gpstracker.

nickfox avatar nickfox commented on July 17, 2024

Ok, so that was the first one. Did you keep the phone and log running to get a better feel of the interval. There could be several reasons for it taking so long. In line 179, try changing accuracy to something bigger like 5000.0 and above that line, log what the accuracy actually is so that you can see it. Also make sure you are running the phone from a place that is close to a window or outdoors and has clear skies above. Having clouds, tall buildings, trees can make getting gps readings a lot worse. Run the phone for about 10 minutes to get more intervals.

from gpstracker.

endl3ssx avatar endl3ssx commented on July 17, 2024

Yes, I did run it by the window and even outdoors, the position is correct, as is the distance and the speed, everything is fine. I don't think is an antenna problem, the updates happen exactly 5 minutes apart, even the seconds. I've run the app all day long today, the accuracy is fine, about 85-107, which has an impact only on my distance. I don't get why it doesn't stay on 1 minute intervals if I select them, I've seen that noone from the issues section encountered this before.

from gpstracker.

brentfraser avatar brentfraser commented on July 17, 2024

I've tested it on my Note2 (Android 4.4.2) with 1 minute interval and it works well.

from gpstracker.

brentfraser avatar brentfraser commented on July 17, 2024

#47 looks similar.

from gpstracker.

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.