A Capacitor shell that opens a Sonda server in a WebView. It asks for the address of the server the first time and remembers it, trusts the certificate authorities installed on the phone, and keeps a notification with the controls so that the music goes on with the screen off. Fixes #47
27 lines
936 B
TypeScript
27 lines
936 B
TypeScript
import type { CapacitorConfig } from '@capacitor/cli'
|
|
|
|
// The app is a window on a Sonda server. The page in www asks for the address the first time and remembers it;
|
|
// the settings of Sonda have a way back to that page, for another server.
|
|
const config: CapacitorConfig = {
|
|
appId: 'app.sonda',
|
|
appName: 'Sonda',
|
|
webDir: 'www',
|
|
server: {
|
|
// The page in www is on http, so that it can look for a server on http as well as on https: from an https page a request to http is blocked.
|
|
androidScheme: 'http',
|
|
// The server is anywhere the user types, on http or https.
|
|
allowNavigation: ['*'],
|
|
cleartext: true,
|
|
},
|
|
plugins: {
|
|
// The app is dark: light clock and icons on the bars.
|
|
SystemBars: { style: 'DARK' },
|
|
},
|
|
android: {
|
|
backgroundColor: '#08161d',
|
|
// The web app knows it is inside the app by this word in the user agent.
|
|
appendUserAgent: 'SondaApp',
|
|
},
|
|
}
|
|
|
|
export default config
|