Now handles disconnection/reconnection automatially when app becomes inactive (such as when tablet/smartphone is put to sleep or other similar actions)