diff --git a/cargo-apk/README.md b/cargo-apk/README.md index 5253b2a..f5f8ad7 100644 --- a/cargo-apk/README.md +++ b/cargo-apk/README.md @@ -153,6 +153,12 @@ icon = "@mipmap/ic_launcher" # Defaults to the compiled artifact's name. label = "Application Name" +# See https://developer.android.com/guide/topics/manifest/application-element#extractNativeLibs +extract_native_libs = true + +# See https://developer.android.com/guide/topics/manifest/application-element#usesCleartextTraffic +uses_cleartext_traffic = true + # See https://developer.android.com/guide/topics/manifest/meta-data-element # # Note: there can be several .meta_data entries. @@ -194,6 +200,9 @@ exported = true # Defaults to true on Android >= 24, no effect on earlier API levels resizeable_activity = false +# See https://developer.android.com/guide/topics/manifest/activity-element#always +always_retain_task_state = true + # See https://developer.android.com/guide/topics/manifest/meta-data-element # # Note: there can be several .meta_data entries. diff --git a/ndk-build/CHANGELOG.md b/ndk-build/CHANGELOG.md index cc201d9..ade84da 100644 --- a/ndk-build/CHANGELOG.md +++ b/ndk-build/CHANGELOG.md @@ -1,5 +1,6 @@ # Unreleased +- 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)) - Enable building from `android` host ([#29](https://github.com/rust-mobile/cargo-apk/pull/29)) # 0.9.0 (2022-11-23) diff --git a/ndk-build/src/manifest.rs b/ndk-build/src/manifest.rs index 924fdbb..6e3696c 100644 --- a/ndk-build/src/manifest.rs +++ b/ndk-build/src/manifest.rs @@ -77,6 +77,10 @@ pub struct Application { #[serde(rename(serialize = "android:label"))] #[serde(default)] pub label: String, + #[serde(rename(serialize = "android:extractNativeLibs"))] + pub extract_native_libs: Option, + #[serde(rename(serialize = "android:usesCleartextTraffic"))] + pub uses_cleartext_traffic: Option, #[serde(rename(serialize = "meta-data"))] #[serde(default)] @@ -104,6 +108,8 @@ pub struct Activity { pub exported: Option, #[serde(rename(serialize = "android:resizeableActivity"))] pub resizeable_activity: Option, + #[serde(rename(serialize = "android:alwaysRetainTaskState"))] + pub always_retain_task_state: Option, #[serde(rename(serialize = "meta-data"))] #[serde(default)] @@ -124,6 +130,7 @@ impl Default for Activity { orientation: None, exported: None, resizeable_activity: None, + always_retain_task_state: None, meta_data: Default::default(), intent_filter: Default::default(), }