package jp.odakyu.toiletsignage.util;

import android.content.Context;
import android.net.ConnectivityManager;

import java.util.Date;

/**
 * Created by agentec on 2018/01/26.
 */

public class CommonUtil {
    /**
     * インターネット（Wifi）チェック
     * @param context Application Context
     * @return internet check
     */
    public static boolean isNetworkAvailable(Context context) {
        final ConnectivityManager connectivityManager = ((ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE));
        return connectivityManager.getActiveNetworkInfo() != null && connectivityManager.getActiveNetworkInfo().isConnected();
    }
}
