checking device connection status on android