ridan
ridan

Reputation: 868

Phonegap background task

I'm developing an iOS phonegap application which receives messages from a node.js/socket.io server. Everything works fine except when the application is "suspended". The user must re-activate the application to see incoming messages. Alerts throw only when the application is active.

Is there any workaround to throw alert messages even if the application is suspended.

Thanks in advance,

Upvotes: 2

Views: 444

Answers (2)

brainray
brainray

Reputation: 12884

On iOS 8 you can wake up the app with a notification or by a time interval and then e.g. performFetchWithCompletionHandler

Upvotes: 0

ridan
ridan

Reputation: 868

After a long research and some tests, it seems that it is impossible to keep an application running on background if it does not track localisation, use voip, play music and a limited number of other scenarios... at least on iOS. I'm going to use APNS instead.

Upvotes: 1

Related Questions