Huessenbergnetz / ocNews

Qt/QML based ownCloud News App client for MeeGo and Sailfish OS
https://www.buschmann23.de/entwicklung/anwendungen/ocnews/
12 stars 6 forks source link

Does ocNews periodic updates respond to WiFi connect and disconnect messages? #17

Closed Zotan closed 10 years ago

Zotan commented 10 years ago

I don't know how ocNews does this, so the below maybe wrong.

If I have been disconnected for a few hours, connecting to WiFi does not seem to cause ocNews to sync even though one is due. Does it listen for WiFi connect and disconnect events? Or work using a simple timer? Responding to WiFi would be great as it would make opportunistic gathering of articles much easier.

buschmann23 commented 10 years ago

Current implentation is a simple timer (QSystemAlignedTimer on Harmattan and QTimer on Sailfish). When the timer is triggered, it checks the configuration if it should perform an update (always, only on wifi, never) and what the current connection type is (wifi or mobile network). The timer is restarted and it performs the update if it should. But there is currently no connection to a change signal. So, for example: you have configured updates every 30 minutes only on wifi, you change to a wifi and there are still 20 minutes till triggering, it needs this 20 minutes, even if the last full update is hours ago.

But it should not be to complicated to implement this, at least on Harmattan, because there are more APIs available to check stuff like that. :)

buschmann23 commented 10 years ago

So, it is now there for Harmattan. I now only have to decide how to handle that on SailfishOS. Currently QSystemNetworkInfo is not allowed in Harbour apps. Anyway, we are currently not on the Store because of the using of own DBus interfaces, but I am not sure if I should add other stuff that bans us from Harbour. Maybe it is possible to listen to some system DBus interfaces to check for changes in the network configuration. Would be nice if Jolla allows some more APIs with the next update that should be released in January.

Zotan commented 10 years ago

Has this been put on open repos? I'm using 1.5.2 and it does not appear to be implemented in this version.

On Sat, 25 Jan 2014, at 03:02 PM, buschmann23 wrote:

So, it is now there for Harmattan. I now only have to decide how to handle that on SailfishOS. Currently QSystemNetworkInfo is not allowed in Harbour apps. Anyway, we are currently not on the Store because of the using of own DBus interfaces, but I am not sure if I should add other stuff that bans us from Harbour. Maybe it is possible to listen to some system DBus interfaces to check for changes in the network configuration. Would be nice if Jolla allows some more APIs with the next update that should be released in January.

Reply to this email directly or [1]view it on GitHub. [245486__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwNjE5NDk0MS wiZGF0YSI6eyJpZCI6MjM4MjMwOTB9fQ==--8a579e027220972095b5b601e58840bb28f defd7.gif]

References

  1. https://github.com/Buschtrommel/ocNews/issues/17#issuecomment-33290757
buschmann23 commented 10 years ago

Oups, I should have written in the text, that it will be part of upcoming version 1.6 release, as already stated in the Milestone indicator. :)

buschmann23 commented 10 years ago

I mark this as closed and fixed for Harmattan. Will open a new issue for SailfishOS.