feat(core): add android activityEmbedding config - #15255
Conversation
automatically configures the project to support Activity embedding and generate split rules from config
Package Changes Through 1f03298There are 11 changes which include tauri with minor, @tauri-apps/api with minor, tauri-utils with minor, tauri-build with minor, tauri-macos-sign with patch, tauri-bundler with minor, @tauri-apps/cli with minor, tauri-cli with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-plugin with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
|
follow-up for #14484 |
| "tauri-utils": minor:feat | ||
| --- | ||
|
|
||
| Added `tauri.conf.json > bundle > android > activityEmbedding` config to enable Activity embedding and define split rules for Android multi-window support. |
There was a problem hiding this comment.
The new splitRules entry declares "secondary": "DetailActivity", but no DetailActivity Kotlin class is generated by tauri-build or declared in the example. Is the expectation this too is generated or is manually supplied by the user?
| Ok(()) | ||
| } | ||
|
|
||
| fn append_split_rule(kt: &mut String, i: usize, rule: &SplitPairRule, package_name: &str) { |
There was a problem hiding this comment.
Both SplitType::Ratio(f64) and EmbeddingAspectRatio::Ratio(f64) variants accept a bare f64. The comments document the SDK's contract (0.0 < r < 1.0 for SplitType::Ratio, > 1.0 for EmbeddingAspectRatio::Ratio), but nothing enforces it. Should this be enforced?
Nit: Kotlin treats values like $identifier and ${expr} as string interpolation. Should we guard against this? (Even if these are invalid for this use-case).
automatically configures the project to support Activity embedding and generate split rules from config