add MIT license
add a Thread to relieve the UI thread
add the wifi connection mode
catch NullPointerException