Get Android WiFi “net.hostname” from code

前端 未结 7 1699
北荒
北荒 2021-01-31 22:43

When an Android device connects to a wifi AP, it identifies itself with a name like:

android_cc1dec12345e6054

How can that string be obtained from within an Andr

7条回答
  •  眼角桃花
    2021-01-31 23:26

    For java:

    you can get the property by below:

    String str = SystemProperties.get("net.hostname");
    

提交回复
热议问题