Code example for FragmentActivity

Methods: onResume

0
        setUpMapIfNeeded(); 
    } 
 
    @Override 
    protected void onResume() { 
        super.onResume(); 
        setUpMapIfNeeded(); 
        if (mMap != null) { 
            updateTraffic(); 
            updateMyLocation(); 
        } 
    } 
 
    private void setUpMapIfNeeded() { 
        if (mMap == null) { 
            mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)) 
                    .getPolarisMap(); 
        } 
    } 
 
    private boolean checkReady() {