my goal is to run a php script and to GET the values returned. I work under Neccesitas SDK (Qt for Android) To do this I do:
m_NetworkAccessMNGR = new QNetworkAccessManager(this);
QEventLoop loop;
QNetworkReply* m_reply = m_NetworkAccessMNGR->get(QNetworkRequest(url));
connect(m_reply, SIGNAL(finished()),
this, SLOT(slothttpFinished()));
connect(m_reply, SIGNAL(readyRead()),
this, SLOT(slothttpReadyRead()));
connect(m_reply, SIGNAL(finished()), &loop, SLOT(quit()));
loop.exec();
ONLY on Android I get in this::slothttpReadyRead
m_reply->error() is QNetworkReply::HostNotFoundError
and m_reply->errorString() outputs:
ERROR: Host www.google.com not found
On Windows this works perfectly.
Should I do some adaptations to Android? Maybe AndroidManifest.xml needs some setup made?
My AndroidManifest.xml contains, among others :
uses-permission android:name="android.permission.INTERNET"/>
uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
Thank you