0

How do you get the current Wifi channel / frequency on Android KitKat devices?

This post talks about it, but it - supposedly - only works for devices with Lollipop (or later OS versions)

Android wifi getting frequency of the connected Wifi

Thanks.

Community
  • 1
  • 1
user1884325
  • 2,530
  • 1
  • 30
  • 49
  • 1
    Available in the [ScanResult](https://developer.android.com/reference/android/net/wifi/ScanResult.html#frequency) since API1. – Matt Clark Sep 12 '16 at 20:20
  • Yeah I noticed, but couldn't find any examples on how to get what i want – user1884325 Sep 12 '16 at 20:29
  • Some simple Googling led me this [this](http://stackoverflow.com/q/29742249/1790644), which does not give you the exact answer you are looking for, but will provide a `ScanResult` object that you should be able to use the above posted call on. – Matt Clark Sep 12 '16 at 20:31
  • Looks like an asynchronous call? I'm looking for a way to determine the channel without having to set up a bcast receiver – user1884325 Sep 12 '16 at 20:34
  • `Looks like an asynchronous call` well yeah, its doing a network scan, you should _never_ synchronize on something like that. – Matt Clark Sep 12 '16 at 21:20

0 Answers0