Problem I'm having:
- 4th line down I get an error saying "com.example.wifilocator.MainActivity" is not an enclosing class
Code in question(From MainActivity) - 4th line:
class wifi {
int signalStrength = 0;
int loopToggle = 0;
Context context = MainActivity.this;
@RequiresApi(api = Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public void loop() throws InterruptedException {
while (loopToggle == 0) {
WifiManager signalStrength = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
String wifiInfo = WifiManager.EXTRA_WIFI_INFO;
TextView textView = (TextView) textView.findViewById(R.id.readOut);
Thread.sleep(1000);
}
}
}
Thanks so much for any help! :)