Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@AliAsadi
Last active June 30, 2019 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AliAsadi/bfa07b1282d928b361cb2221185d8ba5 to your computer and use it in GitHub Desktop.
Save AliAsadi/bfa07b1282d928b361cb2221185d8ba5 to your computer and use it in GitHub Desktop.
public class LoginActivity extends Activity implements LocationListener {
@Override
public void onLocationUpdated(Location location){
// do something
}
@Override
protected void onStart(){
LocationManager.getInstance().register(this);
}
@Override
protected void onStop(){
LocationManager.getInstance().unregister(this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment