All Projects → kongqw → AndroidWiFiManager

kongqw / AndroidWiFiManager

Licence: other
Android WiFi Manager

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to AndroidWiFiManager

Mininet Wifi
Emulator for Software-Defined Wireless Networks
Stars: ✭ 249 (+116.52%)
Mutual labels:  wifi
Auto-Besside-Capturer
Capture WPA handshakes, using besside-ng. Auto upload to http://wpa-sec.stanev.org for cracking the password.
Stars: ✭ 28 (-75.65%)
Mutual labels:  wifi
bl602-pac
Embedded Rust's Peripheral Access Crate for BL602 microcontrollers
Stars: ✭ 16 (-86.09%)
Mutual labels:  wifi
Blynk WM
Blynk and WiFiManager Library for configuring/auto(re)connecting ESP8266/ESP32 modules to the best or available MultiWiFi APs and MultiBlynk servers at runtime, with or without SSL. Configuration data saved in either SPIFFS or EEPROM.
Stars: ✭ 46 (-60%)
Mutual labels:  wifi
ct-frontend
Frontend Demo for Cucumber Tony API
Stars: ✭ 20 (-82.61%)
Mutual labels:  wifi
android-wisefy
Wrapper around WifiManager and ConnectivityManager for Android
Stars: ✭ 300 (+160.87%)
Mutual labels:  wifi
Drcom Gdut Hc5661a Openwrt
在Dr.COM下使用路由器上校园网WIFI(以广东工业大学、极路由1S HC5661A、OpenWrt为例)
Stars: ✭ 245 (+113.04%)
Mutual labels:  wifi
wifi-penetration-testing-cheat-sheet
Work in progress...
Stars: ✭ 149 (+29.57%)
Mutual labels:  wifi
wifi-rs
📡 Easily interface and manage wireless networks.
Stars: ✭ 77 (-33.04%)
Mutual labels:  wifi
1ZLAB PyEspCar
1ZLab在准备挑选合适的小车来研发计算机视觉的教程时候 , 发现习惯了Python语法的我们, 在市面上找不到合适小车, 后来我们选了ESP32作为小车的控制主板, 可以使用Python对其进行交互式编程, 极大的提升了开发效率.
Stars: ✭ 78 (-32.17%)
Mutual labels:  wifi
Pedalino
Smart wireless MIDI foot controller for guitarists and more.
Stars: ✭ 105 (-8.7%)
Mutual labels:  wifi
vietnamese-password-dicts
Tổng hợp danh sách mật khẩu wifi tiếng Việt sử dụng cho aircrack-ng
Stars: ✭ 40 (-65.22%)
Mutual labels:  wifi
ESP-WROOM-Breakout
Breakouts for ESP8266 and ESP32 WiFi/WLAN + Bluetooth modules from Espressif (ESP-WROOM-02, ESP-WROOM-32)
Stars: ✭ 32 (-72.17%)
Mutual labels:  wifi
Node Wifi
📶 NodeJS tool to manage wifi (connections, scans)
Stars: ✭ 250 (+117.39%)
Mutual labels:  wifi
wemosetup
A simple Python script to set up WeMo devices
Stars: ✭ 17 (-85.22%)
Mutual labels:  wifi
Xps15 9560 Bigsur
XPS15-9560-Catalina, Q群:161385229
Stars: ✭ 247 (+114.78%)
Mutual labels:  wifi
ESP8266TimerInterrupt
This library enables you to use Interrupt from Hardware Timers on an ESP8266-based board. It now supports 16 ISR-based timers, while consuming only 1 hardware Timer. Timers' interval is very long (ulong millisecs). The most important feature is they're ISR-based timers. Therefore, their executions are not blocked by bad-behaving functions or tas…
Stars: ✭ 85 (-26.09%)
Mutual labels:  wifi
bridgeap
Automagically bridge any live interface to any idle interface using NATS, DHCP, and HostAP where applicable
Stars: ✭ 52 (-54.78%)
Mutual labels:  wifi
Somfy Remote
Somfy remote control emulator connected to MQTT
Stars: ✭ 19 (-83.48%)
Mutual labels:  wifi
ninjaberry
Ninjaberry: Raspberry Pi UI for @bettercap
Stars: ✭ 39 (-66.09%)
Mutual labels:  wifi

Android WIFI控制

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency

dependencies {
        compile 'com.github.kongqw:AndroidWiFiManager:1.1.1'
}

初始化

// WIFI管理器
mWiFiManager = new WiFiManager(getApplicationContext());

打开WIFI

mWiFiManager.openWiFi();

关闭WIFI

mWiFiManager.closeWiFi();

添加WIFI开关状态的监听

mWiFiManager.setOnWifiEnabledListener(this);

回调

/**
 * WIFI开关状态的回调
 *
 * @param enabled true 打开 false 关闭
 */
@Override
public void onWifiEnabled(boolean enabled) {
    // TODO    
}

移除WIFI开关状态的监听

mWiFiManager.removeOnWifiEnabledListener();

获取WIFI列表

List<ScanResult> scanResults = mWiFiManager.getScanResults();

获取WIFI加密方式

mWiFiManager.getSecurityMode(scanResult)

注意:Android 6.0需要动态获取 Manifest.permission.ACCESS_FINE_LOCATION 或 Manifest.permission.ACCESS_COARSE_LOCATION 后,才能正常获取到WIFI列表。

添加获取WIFI列表的监听

mWiFiManager.setOnWifiScanResultsListener(this);

回调

/**
 * WIFI列表刷新后的回调
 *
 * @param scanResults 扫描结果
 */
@Override
public void onScanResults(List<ScanResult> scanResults) {
    // TODO
}

mWiFiManager.getScanResults(); 是返回当前的WIFI列表,回调返回的是扫描更新以后新的WIFI列表。

移除获取WIFI列表的监听

mWiFiManager.removeOnWifiScanResultsListener();

连接到开放网络

mWiFiManager.connectOpenNetwork(scanResult.SSID);

连接到WPA/WPA2网络

mWiFiManager.connectWPA2Network(scanResult.SSID, password);

连接到WEP网络

mWiFiManager.connectWEPNetwork(scanResult.SSID, password);

添加连接WIFI的监听

mWiFiManager.setOnWifiConnectListener(this);

回调

/**
 * WIFI连接的Log得回调
 *
 * @param log log
 */
@Override
public void onWiFiConnectLog(String log) {
    Log.i(TAG, "onWiFiConnectLog: " + log);
    // TODO
}

/**
 * WIFI连接成功的回调
 *
 * @param SSID 热点名
 */
@Override
public void onWiFiConnectSuccess(String SSID) {
    Log.i(TAG, "onWiFiConnectSuccess:  [ " + SSID + " ] 连接成功");
    // TODO
}

/**
 * WIFI连接失败的回调
 *
 * @param SSID 热点名
 */
@Override
public void onWiFiConnectFailure(String SSID) {
    Log.i(TAG, "onWiFiConnectFailure:  [ " + SSID + " ] 连接失败");
    // TODO
}

移除连接WIFI的监听

mWiFiManager.removeOnWifiConnectListener();

断开网络连接

mWiFiManager.disconnectWifi(connectionInfo.getNetworkId());

删除网络配置

只能删除自己创建的配置,其他应用生成的配置需要Root权限才可以删除。

mWiFiManager.deleteConfig(wifiConfiguration.networkId);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].