phonegap, android, iOS and web browsers

4

Do applications developed in Phonegap serve both mobile (Android, iOS) and web browsers (Firefox, Chrome, iExplore, etc.)?

to have no code for mobile phones and independent desktop.

    
asked by R2D2 19.04.2016 в 22:24
source

4 answers

5

The short answer is yes

The long answer is it depends on how you structure your application.

Phonegap is a distribution of Apache Cordova . It supports Windows 8, 8.1 and 10 plus Ubuntu . The drawback of this is that your application does not run on the browser but as a standalone application.

This framework is designed to interact with the operating system from javascript and does not impose any rule as to which CSS frameworks or javascript you should use. Basically what it does is create a application with a component that is capable of rendering html, css and javascript (usually known as a webview). This component serves html like your browser so applications that work in one will also work in the other.

The problem is that your browser will not allow you to make calls to the operating system, if you use plugins this can happen so it depends mostly on what you are trying to build.

The golden rule here is that you can try to reuse what you have written that has to do with presentation logic while the logic that has to do with the operating system is very likely not to work unless you distribute your app as an independent application.

Keep in mind that this framework was not designed for the browser but for the mobile and that most of the frameworks associated with it will try to make optimizations assuming you are on a mobile.

The best way to prove how compatible your browser can be with your application is to run it with the ripple-emulator or open it in the same browser. Usually you will see many errors that can give you an indication of which code you can reuse and which one you can not.

    
answered by 19.04.2016 в 23:56
1

If they work on android, IOS and desktop, but adding or removing the load of phonegap.js and depending on whether you use plugins that are on Android and IOS or just one of them.

Let's say that you want to add support to mensajes toast on screen, there is a Toast plugin for phonegap that it works perfectly on Android and IOS but on Desktop how is normal there is no support for that. You should keep these small aspects in mind.

I recommend that you look at the framework7 is very well optimized for IOS, Android with skin support simulating native app of each platform, plus works very well in Chrome (desktop) and desktop Firefox.

The framework7 is much lighter compared to the popular Ionic+AngularJS , it also includes a small engine similar to the syntax of JQuery . I have tested it with an ACER Liquid z200 - 512MB of RAM (Input range) and fine not very complex apps.

You can increase the performance in Android by adding crosswalk solution for the versions lower than KITKAT

    
answered by 20.04.2016 в 16:41
0

This Framework is mainly oriented to develop multiplatform mobile applications such as: iOS, Android, BlackBerry, Windows Mobile, etc., through the use of web technology such as HTML, Javascript, CSS.

The phonegap framework is used to port your web application to a mobile environment, what you should do is make your web application that is supported in the browsers that you mention firefox, chrome, iExplore, etc. and later through phonegap to perform adjustments to create mobile versions.

    
answered by 19.04.2016 в 23:26
0

If you develop with cordova / phonegap you will have security problems and both apple and android will tell you to update your applications, if you have a pair nothing happens, but if you have many it is a stick. My advice would be this: 1.- Follow this tutorial, which shows you step by step how to make applications that load external urls: link

2.- And here is another one that uses a webview to upload your own html. link Best regards!

If your applications are simple, it is not necessary to use cordova.

I hope you find the answer useful. Regards,

    
answered by 04.05.2016 в 12:06