kongqw / androidwifimanager Goto Github PK
View Code? Open in Web Editor NEWAndroid WiFi Manager
Android WiFi Manager
compile 'com.android.support:appcompat-v7:23.0.1'
你好像把V7包设置的高了,低于25就报错,没办法只好改你的包了,
安裝在android 6.0 平台,會出現要求打開位置
確認打開位置後,scan 回覆還是 0
public void authorized(int requestCode) {
// 6.0 以上系统授权通过
Log.i(TAG, "6.0 Authorized");
if (GET_WIFI_LIST_REQUEST_CODE == requestCode) {
// 获取WIFI列表
List scanResults = mWiFiManager.getScanResults();
refreshData(scanResults);
}
}
跑的是這段系统授权通过,但list 一片空白
android 4.4 可以正常獲取 list
把WiFiManager.java里面的 case INACTIVE: // 不活跃的
后面的
// 断开连接
int networkId = connectFailureInfo.getNetworkId();
boolean isDisable = wifiManager.disableNetwork(networkId);
boolean isDisconnect = wifiManager.disconnect();
Log.i(TAG, "onReceive: 断开连接 = " + (isDisable && isDisconnect));
去掉就好了
Manifest merger failed : android:exported needs to be explicitly specified for element <receiver#com.kongqw.wifilibrary.WiFiManager$NetworkBroadcastReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for android:exported
when the corresponding component has an intent filter defined.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.