[Solved] Weird nullpointer exception error [closed]
[ad_1] 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 [ad_2] solved Weird nullpointer exception error [closed]