title: Assistance data injection into GPS
body: <p>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:</p>
  
  <pre><code>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);
  </code></pre>
  
  <p>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.</p>
  
  <p>When the wifi connection is enabled, the next log message appears (no error message if wifi is down):</p>
  
  <pre><code>I/app (  627): timeInjection:true
  ....
  D/GpsLocationProvider(   96): NTP server returned: 1306322421969 (WedMay 25 13:20:21 GMT+02:00 2011) reference: 338139 certainty: 77 systemtime offset: 7162
  D/lib_locapi( 96): loc_eng_inject_time, uncertainty = 77
  </code></pre>
  
  <p>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?</p>
  
  <p>To make these tests I have also tried deleting assistance data but I know that this is not well done:</p>
  
  <p>My code:</p>
  
  <pre><code>boolean reset=locationmanager.sendExtraCommand(LocationManager.GPS_PROVIDER, "delete_aiding_data", null);
  </code></pre>
  
  <p>log:</p>
  
  <pre><code>I/app (  627): reset:false
  D/lib_locapi(   96): loc_eng_ioctl for aiding data deletion returned 0, 1 for success
  </code></pre>
  
  <p>I have also tried with GPS STATUS application and the results are the same for both, inject and delete.</p>
  
  <p>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).</p>
  
  <p>Thank you in advance </p>