Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void checkInternetConnection() {
- ConnectivityManager connMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
- NetworkInfo netInfo = connMgr.getActiveNetworkInfo();
- if(netInfo != null && netInfo.isConnected()) {
- getJsonData();
- } else {
- CheckInternetDialog checkInternetDialog = new CheckInternetDialog();
- checkInternetDialog.show(getSupportFragmentManager(), "checkInternetConnection");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment