1、android版本与sdk api版本的对应关系
https://source.android.com/setup/start/build-numbers
2、android api官网:
https://developer.android.com/reference/packages
3、android开发指南
https://developer.android.com/guide
4、android wifi连接的开发指南
https://developer.android.com/guide/topics/connectivity/companion-device-pairing
5、android wifi的扫描功能:
开发指南:https://developer.android.com/guide/topics/connectivity/wifi-scan
api网址:https://developer.android.com/reference/android/net/wifi/WifiManager#getScanResults()
wifi扫描接口startScan,在sdk api为28(android 9)的时候,此接口显示已经弃用,但是目前来看,扫描接口在android 9和android 10依然只能用
这个接口,并对此接口做了一定的限制:前台服务两分钟扫描4次,后台服务30分钟扫描一次
关于此接口废弃的讨论,可以查看:https://stackoverflow.com/questions/49178307/startscan-in-wifimanager-deprecated-in-android-p
如果扫描功能在后台运行,能30分钟扫描一次,如果想两分钟扫描4次,就需要将服务设置为前台服务,并将通知屏蔽。
6、前台服务和后台服务
https://developer.android.com/guide/components/services
博客提供了Android版本与SDK API版本对应关系、Android API官网、开发指南等资源。重点介绍了Android WiFi连接和扫描功能的开发指南及API网址,指出WiFi扫描接口startScan在SDK API 28时已弃用,但在Android 9和10仍可用且有扫描限制,还提及前后台服务相关内容。
2627

被折叠的 条评论
为什么被折叠?



