https://github.com/rangermauve/wifiautoconnect-android
Automatically set up and connect Android devices over Wifi using a Seed key.
https://github.com/rangermauve/wifiautoconnect-android
Last synced: 13 days ago
JSON representation
Automatically set up and connect Android devices over Wifi using a Seed key.
- Host: GitHub
- URL: https://github.com/rangermauve/wifiautoconnect-android
- Owner: RangerMauve
- Created: 2022-04-20T23:30:12.000Z (about 3 years ago)
- Default Branch: default
- Last Pushed: 2022-04-28T18:30:01.000Z (about 3 years ago)
- Last Synced: 2025-03-31T15:08:37.310Z (about 2 months ago)
- Language: Java
- Size: 61.5 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Android WifiAutoConnect
Uses WifiP2P on Android to atomatically establish and connect to wifi access points using a "seed" phrase.
Only supported in Android 10+ (API 29+).
For an example of usage check out [this repository](https://github.com/RangerMauve/WifiP2P-MDNS-Test/blob/default/app/src/main/java/com/example/wifip2p_mdns_test/WifiP2PActivity.java).
## tl;dr
```java
WifiAutoConnect wifiAutoConnect = new WifiAutoConnect(someContextOrActivity);
wifiAutoConnect.setStateChangeListener(new WifiAutoConnect.WifiAutoConnectStateChangeListener(){
@Override
public void onStateChange(int state) {
if(state === WifiAutoConnect.STATE_CONNECTED) {
// Start your MulticastSocket to find peers
}
}
}
wifiAutoConnect.autoConnect();
```