check connection on deviceready