DrupalGap icon indicating copy to clipboard operation
DrupalGap copied to clipboard

Codebase between webapp and mobile app

Open Manikandan85 opened this issue 9 years ago • 2 comments

Hi everyone,

I have created a mobile application using cordova which is already in production. Now I am planned to use the same code for web application. So I thought moving to Drupal Gap will be correct so that I can use web app and mobile app with a same code.

But my existing mobile app code uses cordova plugins like local notification, clock widget, native fb and google login which implements native device features etc.

So If I moved to Drupal Gap, is that possible to use the same cordova calls in Drupal Gap web app so that I don't need to change code between my web app and mobile app?

Note: I have tried to host my mobile app code in web server but it throws error as cordova calls will not be there.

Manikandan85 avatar Nov 28 '16 06:11 Manikandan85

@Manikandan85 cordova plugins will not work in web-app mode because typically they access native device features. You can use the same code base, but any plugins will have to be considered in your code, and made to be skipped in web app mode, or they'll have to be expanded to support web app mode.

signalpoint avatar Nov 28 '16 14:11 signalpoint

Thanks for the reply.

Manikandan85 avatar Nov 29 '16 03:11 Manikandan85