public void onServiceConnected(ComponentName name, IBinder service) {
   loggingService = ((GpsLoggingService.GpsLoggingBinder) service).getService();
   GpsLoggingService.SetRaceClient(RaceMainActivity.this);
   if (!Session.isStarted()) {
     loggingService.StartLogging();
     Session.setStarted(true);
   }
 }
 private void StartAndBindService() {
   Utilities.LogDebug("StartAndBindService FROM RACEACTIVITY - binding now");
   serviceIntent = new Intent(this, GpsLoggingService.class);
   // Start the service in case it isn't already running
   startService(serviceIntent);
   // Now bind to service
   bindService(serviceIntent, gpsServiceConnection, Context.BIND_AUTO_CREATE);
   Session.setRaceBoundToService(true);
 }