I wrote a code which calculates the signal strength of a wifi access points and stores it in an array as shown below.
int signallevel = WifiManager.calculateSignalLevel(result.level, 10);
signalStrength[i] = signallevel;
I am getting a null pointer exception in line 2.
Can any one please help me out. Thanks in advance
I guess your variable
signalStrengthis not initialized. You could post a bit more code, too (just to verify the assumption).