GetSystemService does not exists in current context.

 private string getInternetConnection()
    {
    string sqldb_message="";
        try
        {
            var connectivityManager = (ConnectivityManager)GetSystemService(ConnectivityService);
            var activeConnection = connectivityManager.ActiveNetworkInfo;
            if ((activeConnection != null) && activeConnection.IsConnected)
            {
        sqldb_message="Network Available";
            }
    else
    {
        sqldb_message="Network Not Available";
    }
        }
        catch (SQLiteException ex)
        {
    sqldb_message="Network Not Available";
        }
        return sqldb_message;
    }

but System Give Error Message GetSystemService doesnot exists on current Context.
Tagged:

Answers

Sign In or Register to comment.