question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Toggle WiFi on Android Q+ via UI

See original GitHub issue

Logs: https://gist.github.com/dpgraham/13ceb58e3f377fb81687f0a45c29a171

adb shell am broadcast -a io.appium.settings.wifi -n io.appium.settings/.receivers.WiFiConnectionSettingReceiver --es setstatus disable isn’t disabling WiFI.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mykola-mokhnachcommented, Sep 1, 2022

I don’t think there is anything more we could add to this issue. Lets just not hack Android security. Users can always disable wifi by opening the notifications drawer and clicking the icon there. We cannot implement it this way though as different devices have different UI, so no universal way of finding the wifi icon.

1reaction
mliutimcommented, Mar 21, 2019

How about:

  1. adb shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
  2. adb shell input keyevent 23
Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable Disable WiFi on Android 29 - java - Stack Overflow
Toggling WiFi will not be allowed by apps starting from Android Q according to Google. Here's the issue on their ...
Read more >
How to Programmatically Enable/Disable Wi-Fi in Android?
How to Programmatically Enable/Disable Wi-Fi in Android? · Step 2: Working with the AndroidManifest.xml file. Go to the AndroidManifest. · Step 3: ...
Read more >
WifiManager - Android Developers
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 ...
Read more >
How to get the old Wi-Fi Toggle back on Android 12
If you haven't used ADB commands, head to Android Studio to grab the latest platform tools. Don't worry—you won't need the complete Software ......
Read more >
Turn on Wi-Fi Calling on Galaxy phones - Samsung
Wi-Fi Calling lets you make calls from your Galaxy phone using only a Wi-Fi signal.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found