[Android-development] Can not power on/off the wifi with QNetworkSession.

Alvaro Denis denisacostaq at gmail.com
Mon Apr 10 15:51:15 CEST 2017


Hello all,
I am trying to start with QNetworkSession on Android, looking in the
examples:
network/bearermonitor

With a wifi connection I can create a new QNetworkSession and open on this,
If I try to stop this (QNetworkSession::stop), this not work, I recive
SessionError::OperationNotSupportedError, so if I look at
QNetworkConfigurationManager manager;
manager.capabilities().testFlag(QNetworkConfigurationManager::CanStartAndStopInterfaces);
this return false,

I try to turn on my wifi through open button(QNetworkSession::open), this
not work...

For android I modified the example with these premisions:
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission
android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>

I have the same beahavior on my laptop with Debian...

so what are the prerequisites of the underlain system to support these
operations?

Thanks in advance.





Ing. Alvaro Denis Acosta
[image: https://]about.me/denisacostaq
<https://about.me/denisacostaq?promo=email_sig&utm_source=email_sig&utm_medium=email_sig&utm_campaign=external_links>


[image: --]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20170410/b8419d08/attachment.html>


More information about the Android-development mailing list