this post was submitted on 22 Jul 2023
10 points (100.0% liked)

Ask Android

2949 readers
1 users here now

A place to ask your questions and seek help related to your Android device and the Android ecosystem.

Whether you're looking for app recommendations, phone buying advice, or want to explore rooting and tutorials, this is the place for you!

Rules
  1. Be descriptive: Help us help you by providing as many details as you can.
  2. Be patient: You're getting free help from Internet strangers, so you may have to wait for an answer.
  3. Be helpful: If someone asks you for more information, tell us what you can. If someone asks you for a screenshot, please provide one!
  4. Be nice: Treat others with respect, even if you don't agree with their advice. Accordingly, you should expect others to be nice to you as well. Report intentionally rude answers.
  5. No piracy: Sharing or discussing pirated content is strictly prohibited. Do not ask others for a paid app or about how to acquire one.
  6. No affiliate/marketing links: Posting affiliate links is not allowed.
  7. No URL shorteners: These can hide the true location of the page and lead people to malicious places.
  8. No lockscreen bypasses: Please do not comment, link, or assist with bypassing lock screens or factory reset protection.
  9. No cross-posting: Please take the time to make a proper post instead of cross-posting.
Other Communities

founded 2 years ago
MODERATORS
10
submitted 2 years ago* (last edited 2 years ago) by mfat to c/askandroid
 

Today I installed this widget for toggling wifi/data WITHOUT using the quick settings tiles.

It triggers a bottom pop-up with both data and WiFi settings. What I need is the exact name of this activity to call it with a custom widget I plan to make. Can anyone please help?

top 1 comments
sorted by: hot top controversial new old
[–] ijeff 3 points 2 years ago* (last edited 2 years ago)

I'm not personally familiar nor a dev, but perhaps they're somewhere on this list?

https://developer.android.com/reference/android/net/wifi/WifiManager

  • wifiManager.isWifiEnabled
  • wifiManager.setWifiEnabled

Otherwise, it could be useful to check some open source projects to see what they used.