Skip to content

Commit

Permalink
Add install_location manifest entry
Browse files Browse the repository at this point in the history
  • Loading branch information
zmerp committed May 23, 2024
1 parent caa8062 commit b4cc15d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cargo-apk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ runtime_libs = "path/to/libs_folder"
# desired, run in the same process.
shared_user_id = "my.shared.user.id"

# Controls where the app is installed. Either on external SD card or auto
install_location = "preferExternal"

# Defaults to `$HOME/.android/debug.keystore` for the `dev` profile. Will ONLY
# generate a new debug.keystore if this file does NOT exist. A keystore is never
# auto-generated for other profiles.
Expand Down
2 changes: 2 additions & 0 deletions ndk-build/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Unreleased

- Add `android:installLocation` attribute to the manifest's root.

# 0.10.0 (2023-11-30)

- Add `android:extractNativeLibs`, `android:usesCleartextTraffic` attributes to the manifest's `Application` element, and `android:alwaysRetainTaskState` to the `Activity` element. ([#15](https://github.com/rust-mobile/cargo-apk/pull/15))
Expand Down
3 changes: 3 additions & 0 deletions ndk-build/src/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ pub struct AndroidManifest {
pub version_code: Option<u32>,
#[serde(rename(serialize = "android:versionName"))]
pub version_name: Option<String>,
#[serde(rename(serialize = "android:installLocation"))]
pub install_location: Option<String>,

#[serde(rename(serialize = "uses-sdk"))]
#[serde(default)]
Expand Down Expand Up @@ -44,6 +46,7 @@ impl Default for AndroidManifest {
shared_user_id: Default::default(),
version_code: Default::default(),
version_name: Default::default(),
install_location: Default::default(),
sdk: Default::default(),
uses_feature: Default::default(),
uses_permission: Default::default(),
Expand Down

0 comments on commit b4cc15d

Please sign in to comment.