Reputation: 28197
I'm very new to the mobile arena and have played with both iOS and Android and have a very surface level understanding. I'm beginning to research how my company may build a fairly simple mobile application for both platforms and possibly Windows Phone. I'd like to know if it's possible to mix PhoneGap views with native views?
For example, say I have a tab control at the bottom of the screen with buttons for X, Y, and Z. Is it possible that when I touch X or Y the views loaded respectively would be built via PhoneGap and jQuery Mobile, but when touching Z a view/controller built using native code (Java, Obj C, etc.) could be used? Basically, I have a small part of the app that would have to use native code to access and display information I need from the system, but the majority of the app could be done using HTML 5 tools and I'm uncertain as to whether it's possible or even a good idea in practice to mix these.
Upvotes: 2
Views: 2486
Reputation: 4972
You totally can do that, you'll have to write a special plugin to interface with the native system, as well as your js. Phonegap helps by giving you access to the native features without having to do too much on the actual native side...
With phonegap it's best to use js to do most of the work, but heavy lifting should always be done on the native platform. It all depends on what you want your app to do, the beauty of using a framework like phonegap is that you can hit all devices with one source, so if you've got a lot that will have to happen on the native side you may want to look at what the pros and cons of doing the app in the native language of the phone.
What are you trying to access that phonegap can't give you?
Upvotes: 5