Sub Class_Globals
Private HotSpot1 As Hotspotlib
End Sub
Public Sub Start(AServerName As String, AServerPassword As String)
serverName = AServerName
serverPassword = AServerPassword
Msgbox("1", "")
HotSpot1.tat
Msgbox("2", "")
HotSpot1.batdau(serverName, True, serverPassword)
Msgbox("3", "")
End Sub
Msgbox("1", "") is showing but then is the error:
"An error has occurred in sub:clsserver_start
java.lang.reflect.InvocationTargetException"
Under Android 5 it works, but not under Android 7.
you can check the source and adapt it. The class is available of this lib.
I don´t know the Lib. even dont know what batdau is doing. Check the Classcode
Please note that the lib is around 5 years old. You should check it if it match the new requirements of android 7.
i chekced the class. there is no batdau or tat method... Are these your own methods? if yes; what are you doing there? Post the code
I found the java-code to create a new wifi configuration:
// creating new wifi configuration
WifiConfiguration myConfig = new WifiConfiguration();
myConfig.SSID = ssid; // SSID name of netwok
myConfig.preSharedKey = password; // password for network
myConfig.allowedKeyManagement.set(4); // 4 is for KeyMgmt.WPA2_PSK which is not exposed by android KeyMgmt class
myConfig.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN); // Set Auth Algorithms to open - value is 0