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
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.
startLocalOnlyHotspot