code: def get_networks(cls):
          
          app = AndroidApplication.instance()
          activity = app.widget
          f = app.create_future()
  
          def on_permission_result(result):
              if not result:
                  f.set_result(None)
                  return
  
              def on_ready(mgr):
                  #: Register a receiver so we know when the scan
                  #: is complete
                  receiver = BroadcastReceiver()
                  receiver.setReceiver(receiver.getId())
  
                  def on_scan_complete(context, intent):
                      #: Finally, pull the scan results
                      mgr.getScanResults().then(f.set_result)
  
                      #: Cleanup receiver
                      mgr._receivers.remove(receiver)
                      activity.unregisterReceiver(receiver)
  
                  def on_wifi_enabled(enabled):
                      if not enabled:
                          #: Access denied or failed to enable
                          f.set_result(None)
  
                          #: Cleanup receiver
                          mgr._receivers.remove(receiver)
                          activity.unregisterReceiver(receiver)
                          return
  
                      #: Hook up a callback that's fired when the scan
                      #: results are ready
                      receiver.onReceive.connect(on_scan_complete)
  
                      #: Save a reference as this must stay alive
                      mgr._receivers.append(receiver)
  
                      #: Register the receiver
                      intent_filter = IntentFilter(
                          WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)
                      activity.registerReceiver(receiver,
                                                intent_filter)
  
                      #: Trigger a scan (which "should" eventually
                      #: call the on on_scan_complete)
                      mgr.startScan()
  
                  #: Enable if needed
                  mgr.setWifiEnabled(True).then(on_wifi_enabled)
  
              #: Get the service
              WifiManager.get().then(on_ready)
  
          #: Request permissions
          WifiManager.request_permission(
              WifiManager.PERMISSIONS_REQUIRED).then(on_permission_result)
  
          return f
docs: Get the wifi networks currently available. 
          
          Returns
          --------
              result: future
                  A future that resolves with the list of networks available
                  or None if wifi could not be enabled (permission denied,
                  etc...)