Reply
Thread Tools Search this Thread
Posts: 1,763 | Thanked: 1,874 times | Joined on May 2011 @ Poland
#1
Hi,
I'm working on an app which downloads content from internet. I'm using libcurl for downloading file.
How can I display popup to ask for internet connection and wait with download until internet connection is available?
Thanks in advance
__________________
MeeCoLay: run MeeGo Harmattan apps on Fremantle
PowEdit: manage power key menu entries
User Agent Tool - change Maemo Browser's user agent
MaeLyrica - lyrics download client

If you want to support my work, you can DONATE

You're encouraged to donate at least a couple of euros - otherwise PayPal takes almost everything as a fee.

If you would like to donate in other currency or can't donate but would like to support me, please contact me.
 

The Following User Says Thank You to marmistrz For This Useful Post:
Posts: 681 | Thanked: 742 times | Joined on Jan 2012 @ Finland
#2
For example add following to your main.cpp, it doesn't even ask for popup if user has allowed background connections:

Code:
QNetworkConfigurationManager manager;
QNetworkConfiguration cfg = manager.defaultConfiguration();
QNetworkSession* session = new QNetworkSession(cfg);
session->setSessionProperty("ConnectInBackground", true);
session->open();
__________________
IRC: jonni@freenode ¤ Presence VNC for Harmattan ¤ Live-F1 ¤ BTinput-terminal ¤ BabyLock ¤ BabyLock Trial ¤ QML TextTV ¤
Disclaimer: all my posts in this forum are personal trolling and I never post in any official capacity on behalf of any company.
 

The Following User Says Thank You to rainisto For This Useful Post:
Posts: 1,763 | Thanked: 1,874 times | Joined on May 2011 @ Poland
#3
Originally Posted by rainisto View Post
For example add following to your main.cpp, it doesn't even ask for popup if user has allowed background connections:

Code:
QNetworkConfigurationManager manager;
QNetworkConfiguration cfg = manager.defaultConfiguration();
QNetworkSession* session = new QNetworkSession(cfg);
session->setSessionProperty("ConnectInBackground", true);
session->open();
I added it to both main.cpp and download function and no popup is shown
__________________
MeeCoLay: run MeeGo Harmattan apps on Fremantle
PowEdit: manage power key menu entries
User Agent Tool - change Maemo Browser's user agent
MaeLyrica - lyrics download client

If you want to support my work, you can DONATE

You're encouraged to donate at least a couple of euros - otherwise PayPal takes almost everything as a fee.

If you would like to donate in other currency or can't donate but would like to support me, please contact me.
 
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

 
Forum Jump


All times are GMT -4. The time now is 04:09 PM.