title: MapActivity connection factory client error android
body: <p>I have created an android application.
  it was able to execute it properly but now when i execute it says <code>Couldn't get connection factory client</code> . i am able to see the map also so there is no point of wrong API key .</p>
  
  <p>everything is working but it does not go inside  <code>onLocationChanged(Location location)</code> </p>
  
  <p>EDITED::
  the code is ::</p>
  
  <pre><code>public class GooGleMapsTestDemoActivity extends MapActivity implements LocationListener {
  private Logger logger = LogFileWriter.getLogger();
  protected MapView mapView;
  private MapController controller;
  private LocationManager locationManager;
  private String latitudeAsString = "";
  private String longitudeAsString = "";
  
  private String status = "active";
  public static GeoPoint point1;
  public static GeoPoint point2;
  
  
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      MapView mapView = (MapView) findViewById(R.id.mapView);
      mapView.setBuiltInZoomControls(true);
      controller = mapView.getController();
      mapView.displayZoomControls(true);
  
      MyLocationOverlay locationOverlay = new MyLocationOverlay(this, mapView);
      locationOverlay.enableMyLocation();
      mapView.getOverlays().add(locationOverlay);
      locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);
      Criteria criteria = new Criteria();
      criteria.setAccuracy(Criteria.ACCURACY_COARSE);
      String provider = locationManager.getBestProvider(criteria, true);
      Log.e("====================&gt;&gt;Provider", provider);
      locationManager.requestLocationUpdates(provider, 0, 0, this);
      Location location = locationManager.getLastKnownLocation(provider);
      TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
  
  
  
  
      int longitude = (int) (77.699780 * 1E6);
      int latitude =  (int) (12.951200 * 1E6);
      String text =   "My current location is: " +
      "Latutude = "+latitude+
      "Longitude = "+longitude;
      Toast.makeText(this, text, Toast.LENGTH_LONG).show();
  
      Log.i("========================&gt;&gt;", text);
  
      logger.info(text);
  
      point1 = new GeoPoint(latitude,longitude);
      controller.animateTo(point1);
      controller.setCenter(point1);
      controller.setZoom(14);
  
  }
  
  @Override
  protected boolean isRouteDisplayed() {
      // TODO Auto-generated method stub
      return false;
  }
  
  public void onLocationChanged(Location location) {
      Log.e("==============&gt;&gt;location changed", "location changed");
      if (location!=null)
      {
          int longitude = (int)( location.getLongitude() * 1E6);
          int latitude = (int) (location.getLatitude()  * 1E6);
          double lat = location.getLatitude();
          double lng = location.getLongitude();
  
          if (latitude!=0.0 &amp;&amp; longitude!=0.0)
          {
              String text =   "Location changed to: " +
              "Latitude = " + latitude +
              "Longitude = " + longitude;
              Log.i("========================&gt;&gt;", text);
              logger.info(text);
              Toast.makeText(this,text,Toast.LENGTH_LONG).show();
              point2 = point1;
              point1 = new GeoPoint(latitude, longitude);
  
              controller.animateTo(point2);
              controller.setZoom(14);
              MapOverlay.drawRoute(point1, point2, mapView);
              modifyCoordinates(lat,lng, imeiNo,status);
          }
      }
  }
  
  public void onProviderDisabled(String provider)
  {
      Toast.makeText(getApplicationContext(), provider+" Disabled", Toast.LENGTH_LONG).show();
      Log.e("========================&gt;&gt;", provider+" Disabled");
  
      logger.error(provider+" Disabled");
  }
  public void onProviderEnabled(String provider) 
  {
      Toast.makeText(getApplicationContext(), provider+" Enabled", Toast.LENGTH_LONG).show();
      Log.i("========================&gt;&gt;", provider+" Enabled");
      logger.info(provider+" Enabled");
  }
  public void onStatusChanged(String provider, int status, Bundle extras)
  {
      if(status == LocationProvider.OUT_OF_SERVICE)
      {
          logger.info(provider+" is out of service");
      }
      else if(status == LocationProvider.TEMPORARILY_UNAVAILABLE)
      {
          logger.info(provider+" is currently unavailable");
      }
      else if(status == LocationProvider.AVAILABLE) 
      {
          logger.info(provider+" is available");
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Logcat error ::</p>
  
  <pre><code>E/ZoomButtonsController(586): Cannot make the zoom controller visible if the owner view is not attached to a window.    
  
  E/MapActivity(586): Couldn't get connection factory client
  </code></pre>
  
  <p>please help!
  Thankx.</p>