http://blog.mathocr.com/2017/06/09/beautiful-camera-preview-with-cordova.html
-
Install nodejs:
https://nodejs.org/en/download/
... or alternatively via package manager(linux):
sudo apt-get install -y nodejs
-
Install cordova:
npm install -g cordova
-
Create a project. Name it whatever you want:
cordova create <project_dir_name> <project_address> <project_display_name>
Example:cordova create hello com.example.hello HelloWorld
-
Navigate to newly created project and replace www directory with the one provided with this repo.
-
Add platforms before you run emulator/build:
cordova platform add android
cordova platform add ios
cordova platform add browser
Note: To check all platforms available run:cordova platform
hooks, node_modules, platforms, plugins, res are generated automatically.
config.xml contains application description like its title, autor email, app store description, etc.
The only folder to modify is www.
-
Navigate to project's root folder.
-
Build native app & run it on mobile device:
cordova run android|ios|browser
... or serve files on a localhost:
cordova serve