Do not depend on entering the disconnected state - this should fix issues with networks not being removed on some devices
Update target sdk version
Change version
Add Android Support Library to dependencies
Optimisation and prevent potential issues (network change inside loop)