Create a background service (Android, WP8) using Visual Studio - Cordova


I have created a Multi Device Hybrid App, it's working amazing. I want to create a background service for the app, which runs even if the app is closed. After reading some posts, I found out Cordova doesn't support this natively. Only addin I found was this one: It does the trick 50%, it works, as long as the app isn't force closed. That's not suitable.

Other posts I found was that I have to write a native service. But all posts are focusing on Phonegap / using Eclipse for the Android part. How do I write Java in the Visual Studio solution?

There is no way to create a plugin in Visual Studio today.

That being said, the cordova library to create WP8 plugins can be found here. This library can then be used to create a WP8 plugin as documented here