Build native mobile packages from html/css/js app with PhoneGap Build cloud service
Note: PhoneGap and PhoneGap Build are going to be shut down
General idea
Startup with an html/js/css app. Build an APK from the front-end web app using PhoneGap Build cloud service. Unfortunatly Phonegap CLI fails for some weird reason, so the I had to manually zip it before posting it to the API (the API doesn’t fail but expects the zip up to where I got).
Phonegap Build account
Create an account in https://build.phonegap.com/.
Build android through dev API
Create PhoneGap Build config file in the app root folder containing all the html, css, js..
//config.xml
<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.bustroker.notes"
versionCode = "10"
version = "1.0.0" >
<!-- versionCode is optional and Android only -->
<name>Bustroker Notes</name>
<description>
Personal memorandum.
</description>
<author href="https://www.bustroker.com" email="support@bustroker.com">
Bustroker
</author>
</widget>
Next zip up the folder containing the app plus config.xml
, say as app.zip
, and PUT the PhoneGap Build cloud.
curl -u PHONEGAP-BUILD-ACCOUNT-USER-ID -X PUT -F file=@app.zip https://build.phonegap.com/api/v1/apps/APP-ID
PHONEGAP-BUILD-ACCOUNT-USER-ID: the email used as user id for the account created in PhoneGap Build. APP-ID: the application id. Should be something like 4016017, and is found in https://build.phonegap.com/apps
Provide the password for the account when promped.
Download and install APK
Browse to https://build.phonegap.com/apps
and use the QR code generated for your app to download APK to the mobile.