I'm on a project cross-platform where the client wants a website, an iOS application and an android app. I chose cordova to realise it.
But I have one question, can I host my application like a classic website on a distant server ?
Maxime
While you might be able to reuse parts of your HTML, CSS and JavaScript for the website, Cordova apps run on physical devices like phones and tables and interact
(access device capabilities) with the underlining operating system like Android and iOS.
When you have an existing server-based web app, and you want it running in a Cordova app, you'll have to migrate it. Depending on what your application does you could use a thin Cordova client (think of it as a web browser embedded in a native app) that automatically redirects to your web site.
Link to officially supported platforms.
https://cordova.apache.org/docs/en/latest/guide/support/index.html
EDIT: the following is only for testing, not production
Cordova supports the browser platform.
By running cordova platform add browser you add it to your project and with cordova run browser you run your app in a browser. To run it in a specific port, you need to run cordova run browser -- --port=1234.
You can add, build and run the iOS and Android platforms in the same project.
Take a look here https://www.raymondcamden.com/2016/03/22/the-cordova-browser-platform/
Related
I have been Implemented Universal Windows Platform app in visual studio using winJS, javascript,css and html now i want to use same code base for creating android application..so what all things i need to do to run desktop application into my android mobile.
You have to make a new hybrid application for android using Xamrain as for you can reuse the logic but to port, The whole UWP Application to android using the same is not possible as the scenario you are mentioning.
You can use a lot of your winjs and html code for a hybrid Cordova app (cross-platform)
See here: https://blogs.windows.com/buildingapps/2014/10/23/apache-cordova-and-winjs/
In Visual Studio 2015 I go:
New Project -> Under Javascript/Windows -> Blank App (Universal Windows)
It then creates a new app that has an .html file, a .js, .css, etc.
I then can access system level things via an object that's exposed to javascript.
Now in order of Microsoft to have implemented this I'm guessing my app is hosted within a webview of some sort.
Now let's take Cordova (or Phonegap), I create a windows cordova app and this is a windows app that has a hosted WebView within it. (or does it? atleast that's what it does in iOS and Android).
So isn't this redundant? If my app itself can be a WebView (by making a javascript windows 10 app). Why would I want to host ANOTHER webview like cordova?
Or maybe I'm not understanding something..
Windows 10 Javascript Apps (Also known as WinJS) is a way of building native Windows apps with web based technologies. WinJS provides libraries that provide direct access to the device, underlying OS and framework.
Cordova apps are also built with web based technologies and run inside an embedded web view. Cordova provides a set of libraries for accessing details on the device but these go through another layer that is specific to the OS. While WinJS is only for Windows apps, Cordova apps can, for the most part, be easily rebuilt to run on different platforms.
I'm using browserify and amok to hot-reload my project during development. This way I can build my project continuously and get all live changes whenever i edit & save my html, js or css and I serve my project on localhost using the static http server ecstatic
I open my website in an android emulator, on a usb connected mobile device and in several web browsers
What I would like to add is the option to "synchronize" the navigation (clicking, scrolling, etc...) the way browser-sync does, without all the other capabilities that come with it.
Is there a stand-alone project, that just does the "ghost mode" feature of browser-sync?
If not, can browser-sync be used in a way that it does just that?
I am interesting in making an android application, while my primary hobbies is web development. Now the thing that is confusing me is that people make applications in HTML5/CSS3/JavaScript languages, are those apps running on web browsers on android mobile or running like an installed application on android?
Well you can design and develop your app in 3 ways
Native: full Java code in Android case, or Objective-C or Swift now in iOS
Web: HTML5, CSS3, JavaScript
Hybrid: a mixture of the two
If you are a web developer you can design your app in HTML5 and then use a wrapper like PhoneGap or Apache Cordova which will simply wrap or package your app in a WebView (a Webview is like a simple browser inside a native app).
Then you will have your APK like any other app in Google Play, so yes it's a full application that can be installed, updated and deleted of course, in any Android device
But there is a difference between the two, like the speed varies depending on the app type:
previously, web apps couldn't gain access to the accelerometer, camera, gyroscope etc, but now with the bunch of APIs available, you do have the ability to access them in very simple ways.
A full definition of a webView
The WebView class is an extension of Android's View class that allows
you to display web pages as a part of your activity layout. It does
not include any features of a fully developed web browser, such as
navigation controls or an address bar. All that WebView does, by
default, is show a web page.
More info about WebView Here
Yes they can be opened in web browsers. Those mobile application that is written in HTML5 are really web applications that have Mobile user interface. You can create and experience these projects using Visual Studio 2012. Go to new project -> Web -> ASP.Net MVC 4 Web Application -> in "select a template" choose Mobile Application
This might be really a basic issue. I am kind of confused. I don't understand one thing. Phonegap app is pure html5 and javascript. But for this plugin (https://github.com/davejohnson/phonegap-plugin-facebook-connect/tree/master/example/HackBook) to work we need separate java code for android and xcode for ios.
I got the java version of the android tutorial working with the simulator but when I just copy the assets folder to build a pure phonegap app. it does not work.
Then it beats the purpose if i still have to maintain 2 code lines.
Does just the html and JavaScript code in this plugin is not supported by phonegap app without java or xcode.
Here is my phone gap app. you can download it. https://build.phonegap.com/apps/211586/share
My code in the git repositiry is here
https://bitbucket.org/sunmeet/phonegab2.0_fbapi
PhoneGap Build service only Supports ChildBrowser , Barcode Scanner, Google Analytics recently.
if you try to use any external plugin which needs assets other than HTML / CSS / JS, you can't use them with PhoneGap Build Service. But, PhoneGap Team are trying to push out different plugins like Facebook Connect in Future Releases.
So, here they gave two Options to Deveopers.
Use Child Browser and Do Process Facebook OAuth Authentication.
Build Locally.
Andriod developement environment is "Eclipse" IOS
developement environment is "XCode"(OS: MacOS)
I Suggest you to work with first option and once plugin is our from build service its really easy to integrate anytime.