title: Android Location Service broken when using tabs
body: <p>I'm building an android application which uses gps to locate the user. I have a class called LocationService which extends Service and implements LocationListener. In my activity I have the following code. When I want to turn on the service and listen for locations, I call the startLocationService() method. All this is working fine.</p>
  
  <p>I then put this activity in a tab in a tabhost. Now when I call startLocationService(), nothing happens, the onCreate() method in LocationService is not even called. I checked the "this" reference in the line 
  Intent i = new Intent(this, LocationService.class); 
  and it refers to the correct activity, not the TabActivity.</p>
  
  <p>I'm at a loss to explain why LocationService is not being started. I'd appreciate any light anyone can shed on this.</p>
  
  <p>thanks,
  Paul</p>
  
  <pre><code>private LocationService service = null;
  private ServiceConnection svcConn = new ServiceConnection() {
      public void onServiceConnected(ComponentName className, IBinder binder) {
          service = (LocationService)binder;
          try {
              service.registerCallback(cbListener);
              service.enableProximityPoints();
  
          } catch (Throwable t) {
              Log.e("MyPath", "Exception in call to registerAccount()", t);
          }
      }
      public void onServiceDisconnected(ComponentName className) {
          service = null;
      }
  };
  
  
  
  private void startLocationService(){
      Intent i = new Intent(this, LocationService.class);
      bindService(i, svcConn, 0);
      startService(i);
  }
  </code></pre>