B4A Library Android Wifi Hotspot Manager

Johan Schoeman

Expert
Licensed User
Longtime User
If I comment out that line, the hotspot is not enable (Is Wifi AP enabled = false).
Did you comment this line....?

'hs.AccessPointNameAndPassword("Hotspot Name", "")

I have just tested it and it works
 

susu

Well-Known Member
Licensed User
Longtime User
I tested on 2 devices:

Device 1: I tried your sample code with hs.AccessPointNameAndPassword("Hotspot Name", "Password"). It turn on hotspot with name and password. After that, I remove / comment out hs.AccessPointNameAndPassword("Hotspot Name", "Password"). It still turn on hotspot with the same name and password (it remember the last time). I need to manually change hotspot to Open.

Device 2: Never use hotspot. I tried sample code without hs.AccessPointNameAndPassword("Hotspot Name", "Password"). It can not turn on hotspot.

Thank you Johan.
 

deantangNYP

Active Member
Licensed User
Longtime User
is this library able to do the following? Thanks
- List devices connected , the list currently shows "wlan0" only regardless of devices type.
- show the wifi hotspot name
 
Last edited:

T201016

Active Member
Licensed User
Longtime User
Hi, Johan!
Testing your library I met the following event.
Well, while tethering or access point is active (Wi-Fi Hotspot is on)
the WiFi icon is crossed out (in other words, inactive?). Despite this, the AP works without a problem.

Can this icon WiFi (see file 2018-04-11_1.png) somehow activate?

Besides, the library is well made.
It is a pity that it is not free, but for personal use

Regards.
 

Attachments

  • 2018-04-11_1.png
    207.3 KB · Views: 248
Last edited:

Johan Schoeman

Expert
Licensed User
Longtime User
Feel free to use it whichever what you want.....
 
Hi Johan,
I'm trying your lib which works great on older phones, instead on newer ones I get the following exception after calling the hs.scan:

java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io.BufferedReader.close()' on a null object reference

Also enclosing the hs.scan in a try/catch, it makes the app to crash.

I'm using B4A 11.50 with jdk-11.0.1

Thanks
 

Johan Schoeman

Expert
Licensed User
Longtime User
If I comment out that line, the hotspot is not enable (Is Wifi AP enabled = false).
It is an old library from 7 years ago. I guess there must be something far more recent in the forum that you can use
 

I found the answer to my question: starting from Android 10 the "/proc/net/arp" is not more accessible.

Also found that using "ip neigh show" as a workaround it not working on Android 11
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…