Code example for LocationManager

Methods: removeUpdates

0
  } 
   
  @Override 
  public void onDestroy() { 
    if (mgr!=null) {
      mgr.removeUpdates(this);
    } 
     
    getActivity().getApplicationContext().unbindService(this);
    super.onDestroy(); 
  } 
   
  private void goBlooey(Throwable t) {
    AlertDialog.Builder builder=new AlertDialog.Builder(getActivity());
     
    builder
      .setTitle("Exception!")
      .setMessage(t.toString())
      .setPositiveButton("OK", null)
      .show();
Experience pair programming with AI  Get Codota for Java