Retrieve the BluetoothAdapter in a new way in JELLY_BEAN_MR2 and above

Also check if mChatService and mBluetoothHandler is null before creating them
There is no reason to check flavour before calling close()
Added link to original blog post
Check if data is available before trying to read data

Also set stopReading to false when calling cancel() to make sure thread is stopped
Check if internet connection is available in a better way