Android GPS delay when sending to database

I made an Android application that sends GPS coordinates to a PHP script (every second) that sends them to the database to be stored, and then the Javascript program pulls the coordinates (every second) and displays them to display and track the user using markers and polylines.

I'm having problems with the reliability of the application. I tested it in my room, and I can get location updates just fine, but when I was in class today, the phone did not send the coordinates. I went outside and immediately took a signal, and my coordinates were sent, and then received a PHP script. Is there anything I can do about this, or will I always have problems when inside large buildings? I use 2.2.3 if that helps at all.

Another issue I ran into is the time delay between clicking a button and getting coordinates using a PHP script. It will take about 20-30 seconds before the database writes them. I send some other data to another table and it gets into db almost instantly. Maybe this is because I have so many programs that must pass the coordinates, or the expected time delay, since the phone must run more complex processes to get the coordinates? Is there anything I can do to reduce this delay time?

+5
source share
1 answer

() (php). :

* eclipse . , Android android > * microtime()

+1

All Articles