I want to detect the state of network. I found two ways to look for the internet connection in bb 10.2 but no one seems to be working:
1: It always return "QNetworkAccessManager::UnknownAccessibility"
QNetworkAccessManager* networkAccessManager = new QNetworkAccessManager(this);
networkAccessManager->networkAccessible();
2: It always return true
QNetworkConfigurationManager *manager = new QNetworkConfigurationManager();
bool res = QObject::connect(manager,
SIGNAL(onlineStateChanged(bool)),
this,
SLOT(onOnlineStateChanged(bool)));
Q_ASSERT(res);
Could anybody help me on this?