I have been reading many different posts on Stack Over Flow on getting the signal strength printed and unfortunately, the ideas were a bit too deep for me. Here is what I tried to do to print something and I'm not getting results. I'm using the emulator for now. Maybe there is a next step I am not aware of. Please, if you have any tips, suggestions, advice, or knowledge on what I am doing wrong and on how to access the signal strength, I will appreciate it. Thanks!
TelephonyManager mFlags;
PhoneStateListener phoneStateListener = new PhoneStateListener() {
public void onSignalStrengthsChanged (SignalStrength signalStrength)
{
super.onSignalStrengthsChanged(signalStrength);
Log.v("Not", "Printing this part");
Log.v("Signal Strength Is", String.valueOf(signalStrength.getGsmSignalStrength()));
}
};
Inside of my OnCreate method:
mFlags = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
mFlags.listen(phoneStateListener, PhoneStateListener.LISTEN_SIGNAL_STRENGTHS);
Nothing is working! How do I register the listener? What are the permissions? And finally, why isn't it detecting my listener? The question is still out in the open, and I am as confused as I was in the beginning. I was finding a way to convey my question.