3

This is my map activity class .In this application mylocation works perfectly on Google nexus phone but not works in galaxy tab P3100 .I checked the wifi connection before running the application.And I enabled 1.Use gps satellites,2.Location and Google 3.Use wireless network

public class MyMap extends MapActivity {

private MapController mapController;
private MyLocationOverlay myLocation;

/** 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.map_view);
    mapController = mapView.getController();



    mapController.setZoom(6);
    mapView.setBuiltInZoomControls(true);

    myLocation = new MyLocationOverlay(this, mapView);
    mapView.getOverlays().add(myLocation);

    myLocation.enableMyLocation();

    myLocation.runOnFirstFix(new Runnable() {
        public void run() {
            mapController.animateTo(myLocation.getMyLocation());
        }
    });
}

@Override
protected void onResume() {
    super.onResume();
    myLocation.enableMyLocation();
}

@Override
protected void onPause() {
    super.onPause();
    myLocation.disableMyLocation();
}

@Override
protected boolean isRouteDisplayed() {
    // TODO Auto-generated method stub
    return false;
}
 }

It returns

 Uncaught exception thrown by finalizer
 java.lang.IllegalStateException: Binder has been finalized!
 at android.os.BinderProxy.transact(Native Method)
 at android.database.BulkCursorProxy.close(BulkCursorNative.java:288)
 at android.database.BulkCursorToCursorAdaptor.close(BulkCursorToCursorAdaptor.java:133)
at android.database.CursorWrapper.close(CursorWrapper.java:49)
at android.content.ContentResolver$CursorWrapperInner.close(ContentResolver.java:1591)
    at android.content.ContentResolver$CursorWrapperInner.finalize(ContentResolver.java:1604)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:182)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)
at java.lang.Thread.run(Thread.java:856)

Please give me a solution..

Thanks.

TamiL
  • 2,706
  • 4
  • 24
  • 44

0 Answers0