问题
I'm looking forward to implement reminder application using cordova. I'm looking for a posibility to implement background task using javascript. Even the application is not active it should run in background. Is this task possible with java script or Do I need to develop a plugin using Cordova (Android & IOs)
回答1:
I believe it is not possible to do background work when the app (browser is not active) so I found a great library for cordova
https://github.com/katzer/cordova-plugin-local-notifications
回答2:
I did not found ways to manage background tasks using javascript. Here are few related link to do cordova plugins
https://github.com/jocull/phonegap-backgroundjs
https://github.com/Red-Folder/bgs-core/wiki/Build-your-own-Background-Service
BR
Richard
来源:https://stackoverflow.com/questions/20985419/timer-task-rung-in-background-javascript-or-cordova-app