Code example for WifiManager

Methods: getConnectionInfo

0
 
    public BroadcastReceiver rssiReceiver = new BroadcastReceiver() {
 
        @Override 
        public void onReceive(Context context, Intent intent) { 
            mRssi = mWifiManager.getConnectionInfo().getRssi(); 
            Log.d(TAG, "RSSI changed"); 
            updateSignalText(); 
        } 
    }; 
 
 
    @Override 
    protected void onAttachedToWindow() { 
        super.onAttachedToWindow(); 
 
        if (!mAttached) {
            mAttached = true;
            mHandler = new Handler();
            SettingsObserver settingsObserver = new SettingsObserver(mHandler);
            settingsObserver.observe();