In a class I am validating the connection to the network in Android, and I would like to validate if the true value of that method in another class is executed by another method.
Class 1
public static boolean isConnectedWifi(Context context) {
return true;
}
Class 2
public void saveLocation(Context ctx){
//Codigo ejecución si hay conexión.
}