#android specific config

4 messages · Page 1 of 1 (latest)

zinc cosmos
#

I am using tauri 2 alpha, and am trying to use an android and windows specific config file, where the configs have different window setups, however the android build still loads tauri.windows.conf.json instead of tauri.android.conf.json. is this not implemented yet for android?

for more context, I am trying to setup both desktop and android, desktop has a splash screen but I have errors compiling the close command for mobile, so I set it to desktop only (as I assume its just not available for mobile), I just need to have the splashscreen window not show in android builds

[✔] Environment
    - OS: Windows 10.0.22621 X64
    ✔ WebView2: 116.0.1938.69
    ✔ MSVC: Visual Studio Community 2022
    ✔ rustc: 1.72.0 (5680fa18f 2023-08-23)
    ✔ Cargo: 1.72.0 (103a7ff2e 2023-08-15)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 19.6.0
    - pnpm: 8.7.4
    - yarn: 1.22.19
    - npm: 9.6.7

[-] Packages
    - tauri [RUST]: git+https://github.com/tauri-apps/tauri.git?branch=fix/windows-custom-protocol-url#b4ce5bdb20a617ab2738bf17656ad68cbb3cf4c8 (2.0.0-alpha.12)
    - tauri-build [RUST]: no manifest (2.0.0-alpha.8, 2.0.0-alpha.8)
    - wry [RUST]: 0.32.0
    - tao [RUST]: 0.22.2
    - @tauri-apps/api [NPM]: 2.0.0-alpha.6
    - @tauri-apps/cli [NPM]: 2.0.0-alpha.11

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - framework: React
    - bundler: Rollup
#

tauri.conf.json

{
    "build": {
        "beforeDevCommand": "npm run dev",
        "beforeBuildCommand": "npm run build",
        "devPath": "http://localhost:1420",
        "distDir": "../dist",
        "withGlobalTauri": false
    },
    "package": {
        "productName": "Spacebar",
        "version": "../package.json"
    },
    "tauri": {
        "bundle": {
            "active": true,
            "targets": "all",
            "identifier": "chat.spacebar.app",
            "icon": [
                "icons/32x32.png",
                "icons/128x128.png",
                "icons/[email protected]",
                "icons/icon.icns",
                "icons/icon.ico"
            ]
        },
        "security": {
            "csp": null
        }
    },
    "plugins": {
        "shell": {
            "open": true
        }
    }
}

tauri.windows.conf.json

{
    "tauri": {
        "windows": [
            {
                "fullscreen": false,
                "resizable": true,
                "title": "Spacebar",
                "maximized": true,
                "visible": false,
                "label": "main"
            },
            {
                "width": 400,
                "height": 200,
                "decorations": false,
                "center": true,
                "url": "splashscreen.html",
                "label": "splashscreen"
            }
        ]
    }
}

tauri.android.conf.json

{
    "tauri": {
        "windows": [
            {
                "fullscreen": false,
                "resizable": true,
                "title": "Spacebar",
                "maximized": true,
                "label": "main"
            }
        ]
    }
}
frozen sigil
#

Thanks for reporting this. It was implemented a year ago but there might be a problem in the detection that was never spotted since I'm also running into issues on Linux.

frozen sigil
#

Thank you again for bringing attention to this. It's been patched in tauri-apps/tauri#7802 and will be part of Tauri v2.0.0-alpha.15.