android wifi 热点获取client的名称

TetheringManager.java

registerTetheringEventCallback(Executor executor, TetheringEventCallback callback){

final ITetheringEventCallback remoteCallback = new ITetheringEventCallback.Stub() {

public void onTetherClientsChanged(final List<TetheredClient> clients) {

executor.execute(() -> callback.onClientsChanged(clients));

}

}

}

TetheredClient里的AddressInfo.getHostname 可以获取wifi客户端的名称

追代码(未验证)猜测:

Tethering.updateConnectedClients--->ConnectedClientsTracker.updateConnectedClients

public boolean updateConnectedClients(

Iterable<IpServer> ipServers, @Nullable List<WifiClient> wifiClients) {

for (IpServer server : ipServers) {

for (TetheredClient client : server.getAllLeases()) {

final TetheredClient prunedClient = pruneExpired(client, now);

if (prunedClient == null) continue; // All addresses expired

addLease(clientsMap, prunedClient);

}

}

}

最后是用ipserver获取所有的 dhcp信息并上报

相关推荐
取码网13 分钟前
getapp影视APP源码 反编译APP附教程
android·php
hnlgzb1 小时前
请详细解释一下MVVM这个设计模型
android·kotlin·android jetpack·compose
❀͜͡傀儡师1 小时前
手机变AI助手:ApkClaw让闲置安卓机“再就业”
android·人工智能·智能手机
lxysbly2 小时前
鸿蒙FC红白机模拟器app下载
android·华为·harmonyos
陆业聪2 小时前
SystemUI 里做 Launcher App 列表:四种方案的 Framework 原理与工程取舍
android·framework·systemui·launcher
2501_915106323 小时前
iOS 多技术栈混淆实现,跨平台 App 混淆拆解与组合
android·ios·小程序·https·uni-app·iphone·webview
ii_best3 小时前
自动化开发软件[按键精灵] 安卓/iOS脚本,变量作用域细节介绍
android·运维·ios·自动化
00后程序员张3 小时前
有些卡顿不是 CPU 的问题,还要排查磁盘 I/O
android·ios·小程序·https·uni-app·iphone·webview
_李小白3 小时前
【OSG学习笔记】Day 24: Texture2D 与 Image
android·笔记·学习