Dnia poniedziałek, 23 września 2013 o 10:51:51 noname napisał(a): > Hi everyone, > > I'm currently trying to a) detect if a device (Android in my case) is > connected to a WLAN, and b) if it is, get the network's SSID. Is there a > Qt-way to do so? > I've tried getting all QNetworkConfigurations > (QNetworkConfigurationManager::allConnections()), and there's exactly > one resulting QNetworkConfiguration. It says bearerType() == 'Unknown' > if connected via UMTS or bearerType() == 'Ethernet' if connected via > WLAN. That doesn't make much sense to me, but the state is 'Active' and > the type is 'InternetAccessPoint', which seems correct. Qt version used > is 5.1.1 and tested on Android 4.3 (Galaxy Nexus). > Did I do something wrong here or go the wrong way about getting the > infos I need? > > Many thanks in advance for any advice!
Hi, For getting SSID and other wlan data on Android I was using QSystemInfo which is/was part of QtMobility. It was with Qt 4.8. I was able to get SSID and other data, unfortunately my app crashed when phone lost wi-fi signal, because of range, or router being turned off... IMHO some kind of bug inside this class. At least when you peer at the sources of this class, it should give what you want. Anyway I redesigned my app and I stopped using this class, but it was quite a long time ago, so maybe you should try this approach, I can see many hits on google with Qt Mobility on Android and apparently there is some kind of discussion about it. Cheers Marek > > > kind regards > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest