Android 9.0 wifi hotspot API

前端 未结 2 1104
时光说笑
时光说笑 2020-12-20 08:27

What is the API call I need to make in Android 9.0 (Android P) to get a Wifi hotspot name?

public static String getWifiApSSID(Context context) {
        try         


        
2条回答
  •  礼貌的吻别
    2020-12-20 09:18

    You have another option if your device its rooted.

    Use this command to enable:

    service call connectivity 24 i32 0 i32 1 i32 0 s16 text > /dev/null
    

    In the official documentation of Android, the method startLocalOnlyHotspot allows sharing an internal connection but doesn't have access to internet.

提交回复
热议问题