Skip to content

Instantly share code, notes, and snippets.

@shikto1
Last active January 11, 2020 12:55
Show Gist options
  • Save shikto1/647a8ee5e70d55cd2d9e98036c1c4ea0 to your computer and use it in GitHub Desktop.
Save shikto1/647a8ee5e70d55cd2d9e98036c1c4ea0 to your computer and use it in GitHub Desktop.
public class LeaksActivity extends Activity implements LocationListener {
private LocationManager mLocManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_leaks);
mLocManager = (LocationManager) getSystemService(LOCATION_SERVICE);
mLocManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,
TimeUnit.MINUTES.toMillis(5), 100, this);
}
// Listener implementation omitted
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment