android – Why I'm getting Non static method error from non static context?-ThrowExceptions

Exception or error:

I need to know the SSID of the WiFi network so reading some answers from here I get this code;

And implemented in my .java Class which there’s no static declaration but I get the “Non static method ‘getSSID()’ cannot be referenced from a static context.
Why my context is considered static?

I Also tried to instantiate it with no luck.

The .JAVA class handles the GUI events of a fragment.

Would somebody help to understand what I’m doing wrong?

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *