On Wed, 2014-08-27 at 19:38 +0200, Daniel Holm wrote:
No, there would need to be an OwnCloud module that would send Push
Messages to a subscribed device so that its push helper could setup
downloads (with appropriate config to whether it should download on
cell service or wait for WiFi, etc.)
So you have to call the phone for it to start downloading a file? Would
that conclude that we need to write an app for the actual ownCloud
server service to create such push messages?
Basically, yes. You'd be sending a message that would be sent
to the phone, it is a little more optimized than just calling it
as the messages get batched and set at times when the phone is
awake. The best way to do it is a module for the ownCloud
server, though an intermediary server could be used.
What it needs to do is be able to take the token from a phone
registering and store that for updates. When the app gets
installed on the phone it can get that token, send it to the
ownCloud module, and then the ownCloud server can use that to
talk to the phone. When the message gets to the phone the
ownCloud app can have a smaller helper that can determine if the
message is important and what to do with it, perhaps downloading
a file or starting an address book sync or what ever is needed.
Using push messages is a powerful way to get rid of the need
for many background task operations and since we've left it open
for smaller helpers to run, you can do lots of cool things with
them. Just remember to add a timestamp on the messages (for
files, the timestamp of the file would be good) because the
messages are not delivered right away (on purpose!)