[Solved] Weird nullpointer exception error [closed]


You seem to have forgotten to initialize the context member

An Activity is a subclass of Context, so you don’t need to declare/initialize a separate Context to use. Instead just do;

connManager = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);

1

solved Weird nullpointer exception error [closed]