Re: home screen icon to connect to wi-fi network

Liste des GroupesRevenir à cm android 
Sujet : Re: home screen icon to connect to wi-fi network
De : enrico (at) *nospam* papaloma.net (Enrico Papaloma)
Groupes : comp.mobile.android
Date : 02. Oct 2024, 00:39:56
Autres entêtes
Organisation : Gegeweb News Server
Message-ID : <vdi18c$28o$1@news.gegeweb.eu>
References : 1 2 3 4 5 6
User-Agent : Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1?Content-Type: text/plain; charset=UTF-8; format=flowed
On 9/30/2024 10:04 AM, Andy Burns wrote:
Enrico Papaloma wrote:
 
If no app exists, that's fine - but the COMMANDS must be happening on the
phone, and therefore that series of commands must be known to somebody.
 
Do you have any advice as to how to find what those commands are to connect
to a known access point when that access point is hidden.
 
I did have a look at the APIs
 
<https://developer.android.com/reference/android/net/wifi/WifiManager>
 
But I couldn't find a straightforward call like
 
wm = getSystemService(WIFI_SERVICE);
wm.setWifiEnabled(true);
wm.connectToSSID("whatever");
 
It might require code like this
 
<https://gist.github.com/cp-radhika-s/74d2eb717bad62f39d28a8727708af9c>

Thanks for that link to the wifimanager developer reference.

This might be what is needed but it might only pick & not connect.
ACTION_PICK_WIFI_NETWORK
Activity Action: Pick a Wi-Fi network to connect to.

This might provide enough information about the connection to force it.
EXTRA_WIFI_INFO
The lookup key for a WifiInfo object giving the information about the
access point to which we are connected.

This might be misused to force the connection to a known bssid.
EXTRA_BSSID
The lookup key for a String giving the BSSID of the access point to which
we are connected.

BTW, I wasn't aware of a connect to multiple access points simultaneously.
WIFI_MULTI_INTERNET_MODE_MULTI_AP
Wi-Fi simultaneous connection to multiple internet-providing Wi-Fi networks
(APs) is enabled.

There's a lot to dig through. I'll start with these breadcrumbs to follow.
reassociate()
This method was deprecated in API level 29. a) See
WifiNetworkSpecifier.Builder#build() for new mechanism to trigger
connection to a Wi-Fi network. b) See
addNetworkSuggestions(java.util.List),
removeNetworkSuggestions(java.util.List) for new API to add Wi-Fi networks
for consideration when auto-connecting to wifi. Compatibility Note: For
applications targeting Build.VERSION_CODES.Q or above, this API will always
return false.

There is also a lot to dig through on the link for connecting to a Wi-Fi
connection which might not have internet.
https://gist.github.com/cp-radhika-s/74d2eb717bad62f39d28a8727708af9c

That code seems to be something that might work if I can create an app in
Android Studio to run it, then I'll see if I can tweak it after getting it
to work (if it works) as I'm not all that good with Android Studio yet.

Lots of homework for me to dig through. Thanks!

Date Sujet#  Auteur
15 Sep 24 * home screen icon to connect to wi-fi network38Enrico Papaloma
15 Sep 24 +* Re: home screen icon to connect to wi-fi network4VanguardLH
15 Sep 24 i`* Re: home screen icon to connect to wi-fi network3Enrico Papaloma
18 Sep 24 i `* Re: home screen icon to connect to wi-fi network2Arno Welzel
18 Sep 24 i  `- Re: home screen icon to connect to wi-fi network1Enrico Papaloma
15 Sep 24 +* Re: home screen icon to connect to wi-fi network16Carlos E.R.
19 Sep 24 i`* Re: home screen icon to connect to wi-fi network15Enrico Papaloma
19 Sep 24 i +* Re: home screen icon to connect to wi-fi network5Andy Burns
29 Sep 24 i i`* Re: home screen icon to connect to wi-fi network4Enrico Papaloma
30 Sep 24 i i `* Re: home screen icon to connect to wi-fi network3Andy Burns
2 Oct 24 i i  `* Re: home screen icon to connect to wi-fi network2Enrico Papaloma
2 Oct 24 i i   `- Re: home screen icon to connect to wi-fi network1Andy Burns
19 Sep 24 i +- Re: home screen icon to connect to wi-fi network1Carlos E.R.
28 Sep 24 i `* Re: home screen icon to connect to wi-fi network8Arno Welzel
28 Sep 24 i  +* Re: home screen icon to connect to wi-fi network6Enrico Papaloma
28 Sep 24 i  i+- Re: home screen icon to connect to wi-fi network1Carlos E.R.
29 Sep 24 i  i`* Re: home screen icon to connect to wi-fi network4Arno Welzel
29 Sep 24 i  i `* Re: home screen icon to connect to wi-fi network3Enrico Papaloma
30 Sep 24 i  i  +- Re: home screen icon to connect to wi-fi network1Carlos E.R.
30 Sep 24 i  i  `- Re: home screen icon to connect to wi-fi network1Arno Welzel
28 Sep 24 i  `- Re: home screen icon to connect to wi-fi network1Carlos E.R.
18 Sep 24 `* Re: home screen icon to connect to wi-fi network17Arno Welzel
18 Sep 24  `* Re: home screen icon to connect to wi-fi network16Enrico Papaloma
18 Sep 24   +* Re: home screen icon to connect to wi-fi network9VanguardLH
19 Sep 24   i`* Re: home screen icon to connect to wi-fi network8Enrico Papaloma
19 Sep 24   i `* Re: home screen icon to connect to wi-fi network7VanguardLH
19 Sep 24   i  `* Re: home screen icon to connect to wi-fi network6Enrico Papaloma
22 Sep 24   i   `* Re: home screen icon to connect to wi-fi network5Chris
23 Sep 24   i    +* Re: home screen icon to connect to wi-fi network3Enrico Papaloma
23 Sep 24   i    i`* Re: home screen icon to connect to wi-fi network2Chris
23 Sep 24   i    i `- Re: home screen icon to connect to wi-fi network1Enrico Papaloma
23 Sep 24   i    `- Re: home screen icon to connect to wi-fi network1Enrico Papaloma
28 Sep 24   `* Re: home screen icon to connect to wi-fi network6Arno Welzel
28 Sep 24    `* Re: home screen icon to connect to wi-fi network5Enrico Papaloma
28 Sep 24     +- Re: home screen icon to connect to wi-fi network1Carlos E.R.
29 Sep 24     `* Re: home screen icon to connect to wi-fi network3Arno Welzel
29 Sep 24      `* Re: home screen icon to connect to wi-fi network2Enrico Papaloma
30 Sep 24       `- Re: home screen icon to connect to wi-fi network1Arno Welzel

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal