Question

I am developping an app for Ipad (2 and 3). The app needs a continuous synchronization with a remote web app. Point is, my app needs to keep "listening" whenever there is connectivity in order to receive updates (lots of data), alerts,... etc.

PS: Before going further I would like to highlight that my app is not targeted to the appstore and moreover it can't rely on push notifications.

What I am confused about is the multitasking on the ipad. I would like my app's local db to stay synchronized by communicating with the remote web app. And hence my questions are:

  • Does any of the ipads have a real multitasking? (like android's where you can have "services") Meaning that my app or at least a small part of it would still operate even if it is not active on the screen.

  • How can I achieve that using phonegap standard framework?

  • If the above points show that at some extent it's not possible. Is there still a possibility to extend phonegap with a plugin and make this happen?

  • If the above three points are unfortunately fully negative; how would you address the problem by keeping in mind that the syncrhonization involves a lot of data and is mandatory to cover the app's usability?

Was it helpful?

Solution

Does any of the ipads have a real multitasking? (like android's where you can have "services") Meaning that my app or at least a small part of it would still operate even if it is not active on the screen.

IOS only has limited background services - in that your app goes into a background state when not active. Really only limited to receiving push notifications. As Phonegap uses a webview and javascript that is only active when the app is active in the foreground.

How can I achieve that using phonegap standard framework?

If you want to keep data connection open you might have to look at development of an application for a computer tablet, rather then an IOS device.

If the above points show that at some extent it's not possible. Is there still a possibility to extend phonegap with a plugin and make this happen?

No.

If the above three points are unfortunately fully negative; how would you address the problem by keeping in mind that the syncrhonization involves a lot of data and is mandatory to cover the app's usability?

You only option (if you can only use phonegap) is to have the app active all the time, and set a constant sync using Jquery & XML/JSON data. Of course this depends on what type of data you are going to show. For showing a page of data - similar to a webpage you won't have any problems - as long as you understand once you change apps that data won't be synced.

OTHER TIPS

I would like my app's local db to stay synchronized by communicating with the remote web app.

If I were you, I'd be questioning why would I need to do that? Why not just make the app works online? You can have all the assets locally, and just setup some sort of API to retrieve whatever data you need to display on demand.

Otherwise, you'll need to hack your way through to do all the things you wanted, plus you need offline / online syncing. Since you have most data available offline, I assume the app also works offline? And you'll have a really bad time working on offline / online syncing...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top