This repo is archived. PWABuilder's Google Play / Android packaging platform is now included in the main PWABuilder repo.
This is PWABuilder's Android platform that generates an Android app package from a Progressive Web App using Android's Trusted Web Activity technology.
We utilize Google's Bubblewrap to generate and sign an Android app package.
This tool generates a zip file containing both an .apk file (for testing) and an .aab file (for submission to Google Play Store).
This app uses PWABuilder's Android Build Box docker image, which contains the necessary Android SDK Build Tools to execute Bubblewrap.
Please use our main repository for any issues/bugs/features suggestion.
You will need Docker and the Azure CLI to run this service locally.
Steps:
-
Run
az acr login -n pwabuilderto authenticate with our Azure Container Registry. -
If you are testing locally, go to
Dockerfileand change line 13 toNODE_ENV=test. -
Run
npm run docker:buildto build the Docker image, this may take a while the first time you run it. -
Once the build is complete, run
npm run docker:runto start the Docker container. -
Visit
localhostto see the CloudAPK testing interface.
If you don't want to use the testing interface, you may also generate a package manually by sending a POST to /generateAppPackage with the following JSON body:
{
"additionalTrustedOrigins": [],
"appVersion": "1.0.0.0",
"appVersionCode": 1,
"backgroundColor": "#3f51b5",
"display": "standalone",
"enableNotifications": false,
"enableSiteSettingsShortcut": true,
"fallbackType": "customtabs",
"features": {
"locationDelegation": {
"enabled": true
},
"playBilling": {
"enabled": false
}
},
"host": "https://sadchonks.com",
"iconUrl": "https://sadchonks.com/kitteh-512.png",
"includeSourceCode": false,
"isChromeOSOnly": false,
"launcherName": "Chonks",
"maskableIconUrl": null,
"monochromeIconUrl": null,
"name": "Sad Chonks",
"navigationColor": "#3f51b5",
"navigationColorDark": "#3f51b5",
"navigationDividerColor": "#3f51b5",
"navigationDividerColorDark": "#3f51b5",
"orientation": "default",
"packageId": "com.sadchonks",
"serviceAccountJsonFile": null,
"shareTarget": {
"action": "/share-target/",
"method": "GET",
"params": {
"title": "title",
"text": "text",
"url": "url"
}
},
"shortcuts": [{
"name": "New Chonks",
"short_name": "New",
"url": "/?shortcut",
"icons": [
{
"sizes": "128x128",
"src": "/favicon.png"
}
]
}],
"signing": null,
"signingMode": "none",
"splashScreenFadeOutDuration": 300,
"startUrl": "/saved",
"themeColor": "#3f51b5",
"themeColorDark": "#0d1117",
"webManifestUrl": "https://sadchonks.com/manifest.json"
}The response will be a zip file containing the generated app.
Once an Android app package has been generated, follow the steps on Next Steps.
Deploys are automatically pushed to cloudapk/staging slot. To deploy to production, swap staging and production.