hi there!
i'm currently writing on some piece of code in android 2.1 that is supposed to measure the signal strength of the gsm signals. what i need is some kind of list with some kind of network IDs matching the corresponding signal strengthes... i got this far:
public class main extends Activity {
TelephonyManager telManager;
GSMListener gsmListener;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
gsmListener = new GSMListener();
telManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
telManager.listen(gsmListener ,PhoneStateListener.LISTEN_SIGNAL_STRENGTHS);
}
private class GSMListener extends PhoneStateListener {
/* Get the Signal strength from the provider, each time there is an update */
@Override
public void onSignalStrengthsChanged(SignalStrength signalStrength) {
super.onSignalStrengthsChanged(signalStrength);
Toast.makeText(main.this, "GSM Cinr: " + signalStrength.getGsmSignalStrength(), Toast.LENGTH_SHORT).show();
}
};
}
but at this point, i wonder if there's network-id like the bssid for wifi networks? how is this handled with gsm? i need to identify the gsm network i'm getting the signal strength of.
EDIT:
by "network-id", meant "cell-id". what i need is a list of *all available*
gsm networks in range and their reception quality. the operator-id is not of much interest to me, as i need to identify cell AND network, i'm getting the signal strength from.