[SailfishDevel] Pull data in background

Andrey Kozhevnikov coderusinbox at gmail.com
Sun May 3 02:50:36 UTC 2015


Just make gui view in your application creatable by request and do not 
quit application when window is closed.

03.05.2015 06:27, Nicolas Cisco пишет:
> Hi,
> i'm developing a messaging app (server and client) for a subject at 
> university. The proyect involves developing a server with a REST 
> protocol and an android application. In order to have a real case to 
> use it to compare developing an app for android and salifish, i 
> thought that it would be a good idea to also implement the client for 
> salifish.
>
> The protocol is quite simple, i already managed to develop the server, 
> tested via terminal and send messages using a simple qml app 
> (basically i'm doing ajax calls). My problem is how should i poll 
> notifications and messages. I have to periodically send an ajax 
> call/http request to an url (eg: http://<server addr>/notifications) 
> and the server will answer me with a json with all the new messages.
>
> My first idea is that the qml app pulls the data directly, but, if the 
> app is closed, no more data is pulled. Can the qml app start a service 
> (which runs on the backgound) in order to continue the pulling of data?.
>
> My second idea is to run a daemon which periodically pulls displays 
> notification and communicates with the qml app via dbus. But, i've 
> read that daemons aren't allowed in harbour apps, i want to use this 
> prototype as a real test case of what will be shipping an app to Harbour.
>
> Which would be the correct / recommended way to pull information from 
> a server periodically (in the background)?.
>
> Regards,
> Nicolas.
> -- 
> Nicolas Cisco
> www.nckweb.com.ar <http://www.nckweb.com.ar>
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20150503/be7ce154/attachment.html>


More information about the Devel mailing list