android - WifiManager.is5GHzBandSupported() lying? -
i using new method is5ghzbandsupported() available in wifimanager since api level 21.
http://developer.android.com/reference/android/net/wifi/wifimanager.html#is5ghzbandsupported%28%29
on nexus 5 working fine (returning yes expected),
- on samsung galaxy s4 advance (gt-i9506) running official android rom in version 5.0.1, returning false, apparently incorrect, since device support 5ghz...
- same thing nexus 7 2013, returning no, false
has seen behaviour on other models, rom issue specific these model, or misunderstanding of behaviour of method?
use below code snip detect whether device support 5ghz band or not.
wifimanager wifimanager= (wifimanager)mcontext.getapplicationcontext().getsystemservice(wifi_service); class cls = class.forname("android.net.wifi.wifimanager"); method method = cls.getmethod("isdualbandsupported"); object invoke = method.invoke(wifimanager); boolean is5ghzsupported=(boolean)invoke;
Comments
Post a Comment