0

I am developing a phonegap app in which I need to do some background operations when my app is closed.

Edited - Background operation :: Perform a pull operation at a regular interval from an external server, update the database and later show in notification .

For this I searched and found that there are ways 1> https://github.com/ChrLipp/SmsReceiver-Phonegap 2> Creating an Android Service with Phonegap? (Have phonegap app run even when closed)

but it involve using Android Services.

So my question is if I use this approach will the final app still be ready convertible to IOS or other platform.

Community
  • 1
  • 1
  • 1
    An Android service is, obviously, unique to Android. The more important questions would be if the (unspecified) functionality you wish to implement with this is a) permitted by Apple (or other platform creators) and b) what mechanism would be used on those platforms to do it. Generally, what (and when/due to what trigger) you can do things in the background on iOS is much more restricted than on Android. – Chris Stratton May 19 '13 at 06:33
  • Right.. so adding a android service will destroy Phonegap flavor in which one can readily build apps for other platform.... Edited my question to provide background operation details. – user2350626 May 19 '13 at 06:51
  • 1
    Well, the "adding an android service" would have to be repeated (and repeatable!) with a comparable mechanism on each of the other platforms. FWIW the regular update task in your edit sounds like the kind of thing you cannot do on iOS as there are fairly limited mechanisms for starting up in the background without user interaction, and limited durations you are allowed to keep running the background. So you might really want to ask is if that is doable (/store approvable) on iOS at all, irrespective of phonegap vs objective C as a development method. – Chris Stratton May 19 '13 at 06:56

0 Answers0