public static synchronized TinyBus from ( Context context ) { final TinyBusDepot depot = TinyBusDepot . get ( context ) ; TinyBus bus = depot . getBusInContext ( context ) ; if ( bus == null ) { bus = depot . createBusInContext ( context ) ; } return bus ; }
Use this method to get a bus instance bound to the given context . If instance does not yet exist in the context a new instance will be created . Otherwise existing instance gets returned .