After launching listener by the following code is working fine.
LocationManager locationManager =(LocationManager) getSystemService(Context.LOCATION_SERVICE)
You could pass the parameter like this GPSLocationListener.this
locationManager.removeGpsStatusListener(GPSLocationListener.this);
the compile will not be wrong