cordova - How to create a barebones Phonegap project -
i in process of setting headless, ubuntu 14.04, server enable me automate (script) process of producing android apks phonegap. have done following
- install java jdk
- install ant
- install android sdk
- setup environment path
- created test project following instructions in phonegap cli documentation.
- issued
phonegap build android -d >> result.txt
have apk created under `/app-folder/platforms/android/build/outputs/apk' - moved apk folder on dropbox
- opened, installed , tested apk on android phone
all crystal clear , pretty smooth sailing. however, here run several unknowns.
- the `/app-folder/config.xml' file relatively easy understand still nice have comprehensive resource or cheatsheet explains stuff can put in config.xml. phonegap docs helpful succinct cheatsheet nicer. haven't been able find one.
- ultimately, want build own apks. how should go without starting scratch. can use default hello world project , following
xxx
- change name, description , author attributes in config.xml
- replace #dpi , port-#dpi images
- bind
load
,deviceready
offline
,online
events own stuff - do various
allow-intent
fields? - do various files in
spec
sub folder?
finally, imagine using various plugins there in config.xml file hello world app
<gap:plugin name="org.apache.cordova.battery-status" /> <gap:plugin name="org.apache.cordova.camera" /> <gap:plugin name="org.apache.cordova.media-capture" /> <gap:plugin name="org.apache.cordova.console" /> <gap:plugin name="org.apache.cordova.contacts" /> <gap:plugin name="org.apache.cordova.device" /> <gap:plugin name="org.apache.cordova.device-motion" /> <gap:plugin name="org.apache.cordova.device-orientation" /> <gap:plugin name="org.apache.cordova.dialogs" /> <gap:plugin name="org.apache.cordova.file" /> <gap:plugin name="org.apache.cordova.file-transfer" /> <gap:plugin name="org.apache.cordova.geolocation" /> <gap:plugin name="org.apache.cordova.globalization" /> <gap:plugin name="org.apache.cordova.inappbrowser" /> <gap:plugin name="org.apache.cordova.media" /> <gap:plugin name="org.apache.cordova.network-information" /> <gap:plugin name="org.apache.cordova.splashscreen" /> <gap:plugin name="org.apache.cordova.vibration" />
is liable bloat app assume should more selective leave behind there on per-app basis? , last not least how go modifying basic app sign real world?
i got started on process 6 hours ago , quite surprised far has turned out easy. however, have been unable find tutorials go further telling me how install phonegap-cli , build hello world.
i appreciate , tips.
i have since discovered 1 can create barebones phonegap app in cli starting 1 of many templates. can view templates on offer issuing
phonegap template list
the jquery-mobile-starter
template have found decent starting point. progress still haven't figured out of config.xml settings - particularly plugin , allow-intent ones need modify on per app basis depending on being used still appreciate here.
here link similar question , answer came with. used phonegap build. me seems make more sense , seems more streamlined solution both cordova , phonegap.
here video tutorial , source code hello world, functioning starter app phonegap build.
instructions:
- download source code.
- zip downloaded folder.
- upload .zip file build.phonegap.com/apps.
- click build button.
- scan qr code using mobile device.
- download , install app on mobile device.
the entire process takes 1 minute complete.
Comments
Post a Comment