Conductor: Add onActivityLowMemory

Created on 4 Jun 2016  Â·  5Comments  Â·  Source: bluelinelabs/Conductor

Some time we need to listen to onLowMemory callback in our Controller.
For example when I'm working with Mapbox, it requires to call onLowMemory:

 @Override
    public void onLowMemory() {
        super.onLowMemory();
        mapView.onLowMemory();
    }

If you ok with this feature, I'm happy to do a PR.

Most helpful comment

@leonardo2204 Extra callbacks hurt, I'd even like some removed if possible.

All 5 comments

You have access to this functionality in the Application class

You can propagate information like this using LocalBroadcastManager, an
event bus, RxJava, or manual callbacks that you register. I don't think
this library needs to be responsible for everything when it arguably has
too many callbacks already and other mechanisms exist for passing along
data to controllers.

On Mon, Jun 6, 2016, 10:18 AM Leonardo Ferrari [email protected]
wrote:

But he needs this callback inside some Controller.
I think another callback wouldn't hurt.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/bluelinelabs/Conductor/issues/59#issuecomment-223972549,
or mute the thread
https://github.com/notifications/unsubscribe/AAEEEXOucGbfNij0c-iG7zAaQdBM82_rks5qJCw6gaJpZM4IuFdj
.

@leonardo2204 Extra callbacks hurt, I'd even like some removed if possible.

IMHO, it's more convenient for us if we have this callback (do not need to do some extra steps like event -bus or RxJava). It wouldn't hurt much too, because people can decide to use it or not. Btw it's just my opinion, it's not really important thought.

This should be easy enough to add to the application layer to not be required at the library layer.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JakeWharton picture JakeWharton  Â·  7Comments

MkhytarMkhoian picture MkhytarMkhoian  Â·  11Comments

EricKuck picture EricKuck  Â·  5Comments

tomblenz picture tomblenz  Â·  4Comments

Lancelittle picture Lancelittle  Â·  10Comments