shivao-projeto/mobile/capacitor.config.json
PontualTech / Karlão 7a523b8873 feat(mobile): scaffold Capacitor pra Android Play Store + adapter nativo
ESTRUTURA NOVA: mobile/ + scripts/sync-html.mjs

- mobile/package.json: Capacitor 6 + plugins (geolocation, local-notifications, network, preferences, status-bar)
- mobile/capacitor.config.json: appId br.com.pontualtech.shivao, allowNavigation pra OSM/Windy/CDNs
- mobile/.gitignore: protege keystore (NUNCA commitar chaves privadas)
- mobile/README.md: setup completo (JDK + Android Studio + keystore + build APK/AAB + Play Store submission + iOS futuro + troubleshooting)
- scripts/sync-html.mjs: copia app/diario-bordo.html → server/public + mobile/www (1 fonte da verdade)

ADAPTER NATIVO no HTML (sincronizado app/ + server/public/):
- isNative() / nativePlatform() detecta Capacitor
- nativeWatchPosition() usa Capacitor.Geolocation (background-capable) com fallback navigator.geolocation
- nativeNotify() usa Capacitor.LocalNotifications com fallback toast
- initServiceWorker() pula registro no Capacitor (WebView nativo já tem cache próprio)

NÃO INCLUI (ainda):
- Build local: precisa JDK 17 + Android Studio (~3GB) — instruções no README
- Keystore: gerar 1 vez via keytool (script no README)
- AAB pra Play Store: comandos no README
- Conta Google Play Developer: $25 1× pelo dono

Próximo passo manual: instalar JDK + Android Studio, rodar 'npm install && npx cap add android'.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 16:02:34 -03:00

44 lines
1 KiB
JSON

{
"appId": "br.com.pontualtech.shivao",
"appName": "Shivao",
"webDir": "www",
"bundledWebRuntime": false,
"android": {
"allowMixedContent": false,
"captureInput": true,
"webContentsDebuggingEnabled": false,
"backgroundColor": "#0e2a3dFF"
},
"ios": {
"contentInset": "automatic",
"scrollEnabled": true,
"backgroundColor": "#0e2a3dFF"
},
"server": {
"androidScheme": "https",
"iosScheme": "capacitor",
"cleartext": false,
"url": "https://shivao.pontualtech.work",
"allowNavigation": [
"shivao.pontualtech.work",
"tile.openstreetmap.org",
"*.tile.openstreetmap.org",
"api.windy.com",
"api.open-meteo.com",
"marine-api.open-meteo.com",
"fonts.googleapis.com",
"fonts.gstatic.com",
"cdnjs.cloudflare.com"
]
},
"plugins": {
"Geolocation": {
"permissions": ["location"]
},
"LocalNotifications": {
"smallIcon": "ic_stat_icon_config_sample",
"iconColor": "#a07832",
"sound": "alarme.wav"
}
}
}