when gps starts, something connects to the internet ?

aggelos

Member
Licensed User
Longtime User
Hello
I noticed that when i start the GPS device something connects to the
internet and downloads and uploads about 4,5KB

i tested it with a b4a project that it had only

Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
GPS1.Initialize("GPS")
End If
End Sub

and

Sub Activity_Resume
If GPS1.GPSEnabled = False Then
ToastMessageShow("Please enable the GPS device.", True)
StartActivity(GPS1.LocationSettingsIntent) 'Will open the relevant settings screen.
Else
GPS1.Start(0, 0) 'Listen to GPS with no filters.
End If
End Sub

Sub Activity_Pause (UserClosed As Boolean)
GPS1.Stop
End Sub


test device was a samsung nexus s 2.3.6

everytime i kill the app with a task manager and start it again it connects to
the internet and transfers about 4,5KB

if i use the back key(app is paused) and then resume it,most of the times
it doesn't transfer anything

if i run the app,press home ,then open my sms messages and go back to the app it transfers data again

i have use wireless networks disabled

it's really annoying because my app has a service that starts every minute
and searches for the gps location.

is it possible that another program sees the GPS device activating and connects?
anyone knows if i can stop it ?
is it device specific or all androids do that?


any ideas?


Thank you
Aggelos
 

warwound

Expert
Licensed User
Longtime User
Hi.

I'd guess that this is gps assistance data being downloaded.

I think it'd downloaded from the servers listed in the device's gps.conf file which is located /system/etc.

Here's an example gps.conf file:

B4X:
NTP_SERVER=0.uk.pool.ntp.org
NTP_SERVER=1.uk.pool.ntp.org
NTP_SERVER=2.uk.pool.ntp.org
NTP_SERVER=3.uk.pool.ntp.org
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
SUPL_HOST=supl.google.com
SUPL_PORT=7276
CURRENT_CARRIER=common
DEFAULT_AGPS_ENABLE=TRUE
DEFAULT_SSL_ENABLE=FALSE

The servers listed in your device's gps.conf file are probably being queried for gps assistance data each time the device's GPS hardware is initialised.

Martin.
 
Upvote 0

aggelos

Member
Licensed User
Longtime User
thank you

thank you for the responses.

i 'll put the device behind a wireless mikrotik router and check the connections
in the firewall/connection tracking

i suspect its supl.google.com

my only alternative now is to keep the gps device started

i know its a long shot but
is there anyway to change the supl_host/supl_port programatically?
before starting the gps or passing as a parameter in gps locationmanager


Aggelos
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
There's an app on Android market FasterFix that will update your device's gps.conf file.

Basically it'll choose gps assistance data servers that are nearest to your location.
Often that change is enough to significantly speed up getting a GPS fix.

Anyway FasterFix does programmatically do as you want to do BUT it's an app for rooted devices only.

Martin.
 
Upvote 0
Top