@@ -0,0 +1,923 @@
+package eu.redray.trevie.utility;%0A%0Aimport android.content.Context;%0Aimport android.net.ConnectivityManager;%0Aimport android.net.NetworkInfo;%0A%0Apublic class ConnectionDetector %7B%0A%0A    private Context _context;%0A%0A    public ConnectionDetector(Context context)%7B%0A        this._context = context;%0A    %7D%0A%0A    /**%0A     * Checking for all possible internet providers%0A     * **/%0A    public boolean isConnectingToInternet()%7B%0A        ConnectivityManager connectivity = (ConnectivityManager) _context.getSystemService(Context.CONNECTIVITY_SERVICE);%0A        if (connectivity != null)%0A        %7B%0A            NetworkInfo%5B%5D info = connectivity.getAllNetworkInfo();%0A            if (info != null)%0A                for (int i = 0; i %3C info.length; i++)%0A                    if (info%5Bi%5D.getState() == NetworkInfo.State.CONNECTED)%0A                    %7B%0A                        return true;%0A                    %7D%0A%0A        %7D%0A        return false;%0A    %7D%0A%7D

Add new utility class that will check if internet connection is available