I am new to Android and when I give the following snippet, my Android application is crashing.
ConnectivityManager manager = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);
manager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); // Application is crashing in this line.
I also checked the AndroidManifest.xml where I gave the Internet permission to the application. Any help would be really useful for my further work.
I am not sure what you want to say but if you want to check internet connection then you can use this code
and dont forget