mendorphis
mendorphis

Reputation: 63

Migrate existing Native Android project to Cordova-based project

I've developed Native Android project. I want to add Cordova's plugin interface between native and WebView components so i need to mix my project with Cordova-based project. Is it possible to migrate my existing native project with cordova-based project?

Upvotes: 1

Views: 1128

Answers (2)

jcesarmobile
jcesarmobile

Reputation: 53301

You can embed the cordova webview in your native project

http://docs.phonegap.com/en/3.5.0/guide_platforms_android_webview.md.html#Android%20WebViews

Upvotes: 1

Ricconnect
Ricconnect

Reputation: 1079

It is possible to do this, Cordova just runs as a webview and you could use Cordova on a specific page or part of a page in your native app.

However, you will get zero support to do this. With the new libraries of Cordova (since 3.*), Cordova uses the command line to build a web project and has a specific workflow to do so. The Cordova libraries are not optimized to do this.

If you do not have any UI in your existing project, or you want to replace the existing UI with webpages, you can create a plugin from your existing native code. Otherwise, I would not recommend to try to combine native and web that way with Cordova. You will have to do a lot of custom work to get it work the way you want to.

Another option is to create seperate apps and let them communicate with intents.

Upvotes: 1

Related Questions