Check network before connection and handling exceptions if connection fails. Progress Dialog added while trying to connect to hub.

checking if connected to a network, not wifi.

finishing changes...

changed some auto changed files