I'm creating a Qt Symbian application and need to connect to internet. In some way I need to let the user choose a connection ONCE when the app starts or use the DEFAULT connection if that is enabled.
Before I just used qt_SetDefaultIap() to set the connection on start. It worked perfect but now I need to use QtMobility instead. I have tried the following in QMainWindow when my app starts:
QNetworkConfigurationManager manager;
const bool selectIap = (manager.capabilities()& QNetworkConfigurationManager::CanStartAndStopInterfaces);
QNetworkConfiguration defaultIap = manager.defaultConfiguration();
if(!defaultIap.isValid() && (!selectIap && defaultIap.state() != QNetworkConfiguration::Active))
{
// let the user know that there is no access point available
}
session = new QNetworkSession(defaultIap,this);
session->open();
But there must be something I'm missing as the application always asks the user to choose connection each time it uses internet not just once as I want. And even if I choose a connection the application asks three times. EDIT: It works on Nokia 5800 but not on N97.
This seems to be a problem for many people as it has been discussed before:
Any ideas on how to get this working?