Hi,

I am trying to develop an application which uses GPS and I would like
to inject XTRA data and time reference to the GPS in order to get a
faster fix. My code is the following one:

Bundle bundle = new Bundle();
boolean
xtraInjection=locationmanager.sendExtraCommand(LocationManager.GPS_PROVIDER,
"force_xtra_injection", bundle);
      boolean
timeInjection=locationmanager.sendExtraCommand(LocationManager.GPS_PROVIDER,
"force_time_injection", bundle);

No matter whether internet connection is on or off (no cellular
neither wifi) the xtraInjection and timeInjection booleans are always
true. So, I not able to detect if the assistance information is well
injected into the GPS.

When the wifi connection is enabled, the next log message appeared (no
error message if wifi is down):

I/app (  627): timeInjection:true
....
D/GpsLocationProvider(   96): NTP server returned: 1306322421969 (Wed
May 25 13:20:21 GMT+02:00 2011) reference: 338139 certainty: 77 system
time offset: 7162
D/lib_locapi( 96): loc_eng_inject_time, uncertainty = 77

In contrast, there is no log message related with XTRA data. If the
XTRA data is still valid, the system does not request for it? How can
I see if it is injected successfully?

To make these tests I have also tried deleting assistance data but I
know that this is not well done:

My code:
boolean
reset=locationmanager.sendExtraCommand(LocationManager.GPS_PROVIDER,
"delete_aiding_data", null);

log:
I/app (  627): reset:false
D/lib_locapi(   96): loc_eng_ioctl for aiding data deletion returned
0, 1 for success

I have also tried with GPS STATUS application and the results are the
same for both, inject and delete.

In short, I do not know whether the problem is in my code or is
something in the driver implementation. There is any way to obtain
more information about these problems apart from logcat? (I can not
root my device).

Thank you in advance

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to