Further development:

playing with connection manager and connectivity_change listener