Code example for EventBus

Methods: post

0
    private void updateLocation(Location location) {
        if (isBetterLocation(location, lastLocation)) {
            lastLocation = location;
 
            LocationEvent locationEvent = new LocationEvent();
            eventBus.post(locationEvent);
        } 
    } 
 
    @Override 
    public void onStatusChanged(String s, int i, Bundle bundle) {
    } 
 
    @Override 
    public void onProviderEnabled(String s) {
    } 
 
    @Override 
    public void onProviderDisabled(String s) {
    } 
Contextual code suggestions in your IDE  Get Codota for Java