Build native mobile packages from HTML/CSS/JS with PhoneGap Build API
Note: PhoneGap and PhoneGap Build are going to be shut down
Goal
Convert an HTML/CSS/JS web app into a native Android APK using PhoneGap Build cloud service.
Setup
Create an account at https://build.phonegap.com/
Create config file
Add config.xml to your app root folder:
<?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" >
<name>Bustroker Notes</name>
<description>
Personal memorandum.
</description>
<author href="https://www.bustroker.com" email="support@bustroker.com">
Bustroker
</author>
</widget>
The versionCode attribute is optional and Android-only.
Build APK
Zip your app folder including config.xml:
zip -r app.zip .
Upload to PhoneGap Build:
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: Your PhoneGap Build emailAPP-ID: Found at https://build.phonegap.com/apps (e.g.,4016017)
Enter your password when prompted.
Install
Visit https://build.phonegap.com/apps and scan the QR code to download the APK to your device.