public static void addLifecycleListener(LifecycleListener l){
  if (listeners == null) {
    listeners=new ArrayList<LifecycleListener>();
  }
  listeners.add(l);
}

public static void addLifecycleListener ( LifecycleListener l ) { if ( listeners == null ) { listeners = new ArrayList < LifecycleListener > ( ) ; } listeners . add ( l ) ; }
binds a callback to lifecycle events
