Reputation: 1442
I'm developing a phonegap application for android. I have a database service, written in javascript that keeps the application in sync with a remote server.
I would like to run this service on a different thread, so that the processing of the data doesn't interfere with the other stuff going on in the app. It just needs to happen in the background.
I'm wondering if I could write a phonegap plugin which launches another webCore, which just runs this service.
Anyone have any ideas about how / whether this could be done?
Upvotes: 2
Views: 1104
Reputation: 2557
It just so happens that in the Phonegap documentation, there is a writeup on "How to develop a plugin" doing exactly what you asked. I'm not very fluent with Phonegap Android development, but I believe the link above should help you get on the right foot...
Edit: Since OP is also looking for how to add a second webview, I figured I'd add it to the answer.
Yes, It's possible to add multiple webviews
This is done by using Cordova/PhoneGap as a component with the object known as Cleaver. More documentation on how to do it can be found here for Android, and here for IOS.
Upvotes: 1