android how to stop gps

后端 未结 5 1273
无人共我
无人共我 2020-12-10 06:55

After launching listener by the following code is working fine.

LocationManager locationManager =(LocationManager) getSystemService(Context.LOCATION_SERVICE)         


        
5条回答
  •  隐瞒了意图╮
    2020-12-10 07:17

    My listener implemention

    public class GPSLocationListener extends Activity implements LocationListener {
    
        @Override
            public void onLocationChanged(Location location) {
    //code here
        }
    
        }
    

    when i try to remove listener using follwing code compile time error.

    locationManager.removeGpsStatusListener(GPSLocationListener )
    

提交回复
热议问题