Open shankaranand007 opened 7 years ago
ConnectionDetector conDet = new ConnectionDetector(getBaseContext()); if(!conDet.isConnectingtoInternet()){ Toast.makeText(this, "NO..internet connection", Toast.LENGTH_SHORT).show(); }else{ Toast.makeText(this, "Internet connected", Toast.LENGTH_SHORT).show(); } //instance meteor = new Meteor(MainActivity.this, "ws://ydapp.in:3000//websocket"); //callback meteor.addCallback(this);
//establish connection meteor.connect(); if (meteor.isConnected()) { Toast.makeText(this, "connect", Toast.LENGTH_SHORT).show(); Intent i = new Intent(MainActivity.this, Welcome.class); startActivity(i); } else { Log.e("Errorr","Error"); Toast.makeText(this, "Not connect", Toast.LENGTH_SHORT).show(); meteor.reconnect(); }
ConnectionDetector conDet = new ConnectionDetector(getBaseContext()); if(!conDet.isConnectingtoInternet()){ Toast.makeText(this, "NO..internet connection", Toast.LENGTH_SHORT).show(); }else{ Toast.makeText(this, "Internet connected", Toast.LENGTH_SHORT).show(); } //instance meteor = new Meteor(MainActivity.this, "ws://ydapp.in:3000//websocket"); //callback meteor.addCallback(this);