Android 應用程式
有兩種方式把 HK GeoTiles 安裝到 Android 裝置:PWA 快速安裝(無需電腦,2 分鐘完成)或 TWA 打包成原生 APK(需要電腦,可上架 Play Store)。
方法一:PWA 加到主畫面
Method 1: Add to Home Screen as PWA
用 Chrome 開啟地圖 Open Map in Chrome
在 Android Chrome 瀏覽器開啟 https://hkgeotiles.com/map
Open https://hkgeotiles.com/map in Android Chrome browser
點選「加到主畫面」 Tap "Add to Home Screen"
點選 Chrome 右上角選單(⋮),選擇「加到主畫面」或「安裝應用程式」。
Tap the Chrome menu (⋮) in the top right, then select "Add to Home Screen" or "Install App".
確認安裝 Confirm Installation
點選「安裝」,HK GeoTiles 圖示會出現在主畫面,全螢幕啟動,無瀏覽器介面。
Tap "Install". The HK GeoTiles icon appears on your home screen and launches full-screen without browser UI.
方法二:TWA 打包成原生 APK
Method 2: Package as Native APK via Trusted Web Activity
安裝 Android Studio Install Android Studio
從 developer.android.com 下載並安裝 Android Studio(免費)。
Download and install Android Studio (free) from developer.android.com.
安裝 Bubblewrap CLI Install Bubblewrap CLI
在終端機執行以下指令安裝 Google 官方 TWA 打包工具:
Run the following command to install Google's official TWA packaging tool:
npm install -g @bubblewrap/cli
初始化 TWA 專案 Initialise TWA Project
建立新資料夾,然後執行初始化指令(填入你的網站資訊):
Create a new folder, then run the init command (fill in your site details):
mkdir hkgeotiles-android && cd hkgeotiles-android bubblewrap init --manifest https://hkgeotiles.com/manifest.json
設定 Digital Asset Links Set Up Digital Asset Links
TWA 需要驗證網站擁有權。Bubblewrap 會生成一個 assetlinks.json,需要放到:
TWA requires domain ownership verification. Bubblewrap generates assetlinks.json to place at:
https://hkgeotiles.com/.well-known/assetlinks.json
建置 APK Build the APK
執行建置指令,生成可安裝的 APK 檔案:
Run the build command to generate an installable APK:
bubblewrap build
安裝到 Android 裝置 Install on Android Device
啟用「未知來源安裝」後,用 adb 安裝或直接傳送 APK 到手機:
Enable "Install unknown apps", then install via adb or transfer the APK to your phone:
adb install app-release.apk
PWA Manifest
本站已設定 Web App Manifest,支援 PWA 安裝。Bubblewrap 可直接讀取:
https://hkgeotiles.com/manifest.json