├── app ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values-v21 │ │ │ └── styles.xml │ │ ├── mipmap-hdpi │ │ │ ├── alipay.png │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ └── styles.xml │ │ ├── anim │ │ │ ├── dialog_bottom_in.xml │ │ │ └── dialog_bottom_out.xml │ │ ├── values-w820dp │ │ │ └── dimens.xml │ │ └── layout │ │ │ ├── item_wifi.xml │ │ │ ├── dialog_connect_wifi.xml │ │ │ └── activity_main.xml │ │ ├── java │ │ └── kong │ │ │ └── qingwei │ │ │ └── kqwwifimanagerdemo │ │ │ ├── util │ │ │ └── VlanUtil.java │ │ │ ├── MyApplication.java │ │ │ ├── view │ │ │ └── ConnectWifiDialog.java │ │ │ ├── adapter │ │ │ └── WifiListAdapter.java │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── WiFiLibrary ├── .gitignore ├── src │ └── main │ │ ├── res │ │ └── values │ │ │ └── strings.xml │ │ ├── java │ │ └── com │ │ │ └── kongqw │ │ │ └── wifilibrary │ │ │ ├── SecurityModeEnum.java │ │ │ ├── listener │ │ │ ├── OnWifiEnabledListener.java │ │ │ ├── OnWifiScanResultsListener.java │ │ │ └── OnWifiConnectListener.java │ │ │ ├── BaseWiFiManager.java │ │ │ └── WiFiManager.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── .idea ├── caches │ ├── gradle_models.ser │ └── build_file_checksums.ser ├── copyright │ └── profiles_settings.xml ├── markdown-navigator │ └── profiles_settings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── compiler.xml ├── gradle.xml ├── inspectionProfiles │ └── Project_Default.xml ├── codeStyles │ └── Project.xml ├── misc.xml └── markdown-navigator.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── README.md └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /WiFiLibrary/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':WiFiLibrary' 2 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/caches/gradle_models.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanInfo/WiFiManager/HEAD/.idea/caches/gradle_models.ser -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanInfo/WiFiManager/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanInfo/WiFiManager/HEAD/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /WiFiLibrary/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | WiFiLibrary 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/alipay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanInfo/WiFiManager/HEAD/app/src/main/res/mipmap-hdpi/alipay.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanInfo/WiFiManager/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanInfo/WiFiManager/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanInfo/WiFiManager/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanInfo/WiFiManager/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanInfo/WiFiManager/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.idea/markdown-navigator/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | AndroidWiFiManager 3 | MainActivity 4 | 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Mar 08 14:00:33 CST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/dialog_bottom_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/dialog_bottom_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | -------------------------------------------------------------------------------- /WiFiLibrary/src/main/java/com/kongqw/wifilibrary/SecurityModeEnum.java: -------------------------------------------------------------------------------- 1 | package com.kongqw.wifilibrary; 2 | 3 | /** 4 | * @Author: zhangyan 5 | * @Date: 2019/4/10 10:00 6 | * OPEN, WEP, WPA, WPA2 7 | * WIFI的四种安全性状态,枚举类型 8 | */ 9 | 10 | public enum SecurityModeEnum { 11 | OPEN, WEP, WPA, WPA2 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/kong/qingwei/kqwwifimanagerdemo/util/VlanUtil.java: -------------------------------------------------------------------------------- 1 | package kong.qingwei.kqwwifimanagerdemo.util; 2 | 3 | /** 4 | * @Author: zhangyan 5 | * @Date: 2019/4/9 17:26 6 | * @Description: 7 | * @Version: 1.0 8 | */ 9 | /** 10 | * 开启热点工具类 11 | */ 12 | public class VlanUtil { 13 | 14 | 15 | } 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /WiFiLibrary/src/main/java/com/kongqw/wifilibrary/listener/OnWifiEnabledListener.java: -------------------------------------------------------------------------------- 1 | package com.kongqw.wifilibrary.listener; 2 | 3 | /** 4 | * @Author: zhangyan 5 | * @Date: 2019/4/10 10:19 6 | * WIFI打开关闭的回调接口 7 | */ 8 | public interface OnWifiEnabledListener { 9 | 10 | /** 11 | * WIFI开关的回调 12 | * 13 | * @param enabled true 可用 false 不可用 14 | */ 15 | void onWifiEnabled(boolean enabled); 16 | } 17 | -------------------------------------------------------------------------------- /WiFiLibrary/src/main/java/com/kongqw/wifilibrary/listener/OnWifiScanResultsListener.java: -------------------------------------------------------------------------------- 1 | package com.kongqw.wifilibrary.listener; 2 | 3 | import android.net.wifi.ScanResult; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @Author: zhangyan 9 | * @Date: 2019/4/10 10:17 10 | * WIFI扫描结果的回调接口 11 | */ 12 | public interface OnWifiScanResultsListener { 13 | 14 | /** 15 | * 扫描结果的回调 16 | * 17 | * @param scanResults 扫描结果 18 | */ 19 | void onScanResults(List scanResults); 20 | } 21 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /WiFiLibrary/src/main/java/com/kongqw/wifilibrary/listener/OnWifiConnectListener.java: -------------------------------------------------------------------------------- 1 | package com.kongqw.wifilibrary.listener; 2 | 3 | /** 4 | * @Author: zhangyan 5 | * @Date: 2019/4/10 10:25 6 | * WIFI连接的回调接口 7 | */ 8 | public interface OnWifiConnectListener { 9 | 10 | /** 11 | * WIFI连接信息的回调 12 | * 13 | * @param log log 14 | */ 15 | void onWiFiConnectLog(String log); 16 | 17 | /** 18 | * WIFI连接成功的回调 19 | * 20 | * @param SSID 热点名 21 | */ 22 | void onWiFiConnectSuccess(String SSID); 23 | 24 | /** 25 | * WIFI连接失败的回调 26 | * 27 | * @param SSID 热点名 28 | */ 29 | void onWiFiConnectFailure(String SSID); 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_wifi.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /WiFiLibrary/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/kongqingwei/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/java/kong/qingwei/kqwwifimanagerdemo/MyApplication.java: -------------------------------------------------------------------------------- 1 | package kong.qingwei.kqwwifimanagerdemo; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | 6 | import com.squareup.leakcanary.LeakCanary; 7 | 8 | /** 9 | * @Author: zhangyan 10 | * @Date: 2019/4/9 15:48 11 | * @Description: 全局Application 12 | * @Version: 1.0 13 | */ 14 | public class MyApplication extends Application { 15 | 16 | @Override 17 | public void onCreate() { 18 | super.onCreate(); 19 | context = getApplicationContext(); 20 | 21 | if (LeakCanary.isInAnalyzerProcess(this)) { 22 | return; 23 | } 24 | LeakCanary.install(this); 25 | } 26 | 27 | public static Context getContext() { 28 | return context; 29 | } 30 | 31 | private static Context context; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 22 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /WiFiLibrary/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.2" 6 | 7 | defaultConfig { 8 | minSdkVersion 14 9 | targetSdkVersion 25 10 | versionCode 1 11 | versionName "1.0" 12 | 13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 14 | 15 | } 16 | buildTypes { 17 | release { 18 | minifyEnabled false 19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 20 | } 21 | } 22 | } 23 | 24 | dependencies { 25 | compile fileTree(dir: 'libs', include: ['*.jar']) 26 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 27 | exclude group: 'com.android.support', module: 'support-annotations' 28 | }) 29 | compile 'com.android.support:appcompat-v7:25.2.0' 30 | testCompile 'junit:junit:4.12' 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 9 | 10 | 17 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.2" 6 | 7 | defaultConfig { 8 | applicationId "kong.qingwei.kqwwifimanagerdemo" 9 | minSdkVersion 15 10 | targetSdkVersion 22 11 | versionCode 1 12 | versionName "1.0" 13 | vectorDrawables.useSupportLibrary = true 14 | } 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 19 | } 20 | } 21 | } 22 | 23 | dependencies { 24 | compile fileTree(include: ['*.jar'], dir: 'libs') 25 | compile project(':WiFiLibrary') 26 | compile 'com.android.support:appcompat-v7:25.2.0' 27 | compile 'com.android.support:design:25.2.0' 28 | compile 'com.android.support:support-v4:25.2.0' 29 | compile 'com.android.support:support-vector-drawable:25.2.0' 30 | testCompile 'junit:junit:4.12' 31 | 32 | debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5' 33 | releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' 34 | testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' 35 | 36 | compile 'com.github.kongqw:PermissionsManager:1.0.0' 37 | } 38 | -------------------------------------------------------------------------------- /WiFiLibrary/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_connect_wifi.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 26 | 27 | 31 | 32 |