code: @RequiresPermission(ACCESS_WIFI_STATE)
    public static Observable<WifiInfo> observeWifiAccessPointChanges(final Context context) {
      final WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
      final IntentFilter filter = new IntentFilter();
      filter.addAction(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION);
  
      return Observable.create(new ObservableOnSubscribe<WifiInfo>() {
        @Override public void subscribe(final ObservableEmitter<WifiInfo> emitter) throws Exception {
          final BroadcastReceiver receiver =
              createAccessPointChangesReceiver(emitter, wifiManager);
  
          context.registerReceiver(receiver, filter);
  
          Disposable disposable = disposeInUiThread(new Action() {
            @Override public void run() {
              tryToUnregisterReceiver(context, receiver);
            }
          });
  
          emitter.setDisposable(disposable);
        }
      });
    }
docs: Observes the WiFi network the device is connected to.
  Returns the current WiFi network information as a {@link WifiInfo} object.
  
  @param context Context of the activity or an application
  @return RxJava Observable with WifiInfo