I have this method to check if the device is connected. But I'm getting some msgs of problems with syncing my data. And I'm thinking there must have been this change in the internet verification method. I am not experienced, so I preferred to come and ask if there is something wrong or missing in this method. Thank you.
public static boolean isNetworkAvailable (Context context) {
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
return activeNetworkInfo != null && activeNetworkInfo.isConnected() && activeNetworkInfo.isAvailable();
}