连接到移动热点的用户的详细信息 [英] Details of connected users to mobile hotspot

查看:22
本文介绍了连接到移动热点的用户的详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在我的安卓手机上启用了 Wi-Fi 热点,而另外 2 部安卓手机连接到我的热点,那么我如何区分每部手机?

If I've enabled Wi-Fi Hotspot in my android phone and 2 other android phones are connected to my Hotspot, then how can I distinguish between each phone?

我的手机是否使用 IEMI 号码或其他方式区分不同的手机?

Does my phone distinguish between the different phones using IEMI numbers or something else?

推荐答案

1) 您可以使用 BroadcastReciever "android.net.wifi.WIFI_HOTSPOT_CLIENTS_CHANGED" 来检测客户端连接.在您的 AndroidManifest 中:

1) You can use BroadcastReciever "android.net.wifi.WIFI_HOTSPOT_CLIENTS_CHANGED" to detect client connection. In your AndroidManifest:

<receiver
        android:name=".WiFiConnectionReciever"
        android:enabled="true"
        android:exported="true" >
        <intent-filter>
            <action android:name="android.net.wifi.WIFI_HOTSPOT_CLIENTS_CHANGED" />
        </intent-filter>
    </receiver>

并在您的活动中:

IntentFilter mIntentFilter = new IntentFilter();
  mIntentFilter.addAction("android.net.wifi.WIFI_HOTSPOT_CLIENTS_CHANGED");
                    rcv = new WiFiConnectionReciever();
                    registerReceiver(rcv,
                            mIntentFilter);

2) 另一方面,请检查此答案:https://stackoverflow.com/a/21545389/1384010

2) On other hand please check this answer too: https://stackoverflow.com/a/21545389/1384010

希望以上方法之一对您有所帮助!!

Hope one of above methods will help you !!

这篇关于连接到移动热点的用户的详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆