diff --git a/build.gradle b/build.gradle
index 120f69c3f..ff5094adc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -8,8 +8,8 @@ buildscript {
// Android SDK Versions
minSdkVersion = 21
- compileSdkVersion = 35
- targetSdkVersion = 35
+ compileSdkVersion = 34
+ targetSdkVersion = 34
// Looking for dependency versions?
// See: ./gradle/libs.versions.toml
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index e85d1402a..170351d7a 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -83,7 +83,7 @@ google-truth = '1.1.3'
junit = '4.13.2'
mockito = '4.6.1'
mockito-kotlin = '4.0.0'
-robolectric = '4.14-beta-1'
+robolectric = '4.11.1'
turbine = '0.10.0'
mockk = '1.13.5'
@@ -144,6 +144,7 @@ androidx-fragment-testing = { module = "androidx.fragment:fragment-testing", ver
androidx-lifecycle-common-java8 = { module = "androidx.lifecycle:lifecycle-common-java8", version.ref="androidx-lifecycle" }
androidx-lifecycle-livedataktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref="androidx-lifecycle" }
androidx-lifecycle-runtimektx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref="androidx-lifecycle" }
+androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref="androidx-lifecycle" }
androidx-lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel", version.ref="androidx-lifecycle" }
androidx-lifecycle-viewmodelktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref="androidx-lifecycle" }
androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment", version.ref = "androidx-navigation" }
diff --git a/sample/src/main/res/values/styles.xml b/sample/src/main/res/values/styles.xml
index cd25a6518..0829beb1c 100644
--- a/sample/src/main/res/values/styles.xml
+++ b/sample/src/main/res/values/styles.xml
@@ -14,7 +14,6 @@
- #000000
- @style/AppTheme.MessageCenter
- @color/airshipBlue
- - true
diff --git a/urbanairship-layout/src/main/java/com/urbanairship/android/layout/AirshipEmbeddedViewManager.kt b/urbanairship-layout/src/main/java/com/urbanairship/android/layout/AirshipEmbeddedViewManager.kt
index 3a0cb52ae..2a194fcff 100644
--- a/urbanairship-layout/src/main/java/com/urbanairship/android/layout/AirshipEmbeddedViewManager.kt
+++ b/urbanairship-layout/src/main/java/com/urbanairship/android/layout/AirshipEmbeddedViewManager.kt
@@ -72,5 +72,9 @@ public interface AirshipEmbeddedViewManager {
embeddedViewId: String,
comparator: Comparator? = null,
scope: CoroutineScope
- ): Flow
+ ): Flow
}
+
+/** @hide */
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+public data class EmbeddedDisplayRequestResult(public val next: EmbeddedDisplayRequest?, public val list: List)
diff --git a/urbanairship-layout/src/main/java/com/urbanairship/android/layout/environment/LayoutState.kt b/urbanairship-layout/src/main/java/com/urbanairship/android/layout/environment/LayoutState.kt
index 641dce7d6..0743a7ba3 100644
--- a/urbanairship-layout/src/main/java/com/urbanairship/android/layout/environment/LayoutState.kt
+++ b/urbanairship-layout/src/main/java/com/urbanairship/android/layout/environment/LayoutState.kt
@@ -18,24 +18,6 @@ internal class LayoutState(
val radio: SharedState?,
val layout: SharedState?,
) {
- fun override(
- pagerState: SharedState?,
- formState: SharedState?,
- parentForm: SharedState?,
- checkboxState: SharedState?,
- radioState: SharedState?,
- layoutState: SharedState?,
- ): LayoutState {
- return LayoutState(
- pager = pagerState ?: this.pager,
- form = formState ?: this.form,
- parentForm = parentForm ?: this.parentForm,
- checkbox = checkboxState ?: this.checkbox,
- radio = radioState ?: this.radio,
- layout = layoutState ?: this.layout,
- )
- }
-
fun reportingContext(
formContext: FormInfo? = null,
pagerContext: PagerData? = null,
diff --git a/urbanairship-layout/src/main/java/com/urbanairship/android/layout/ui/EmbeddedLayout.kt b/urbanairship-layout/src/main/java/com/urbanairship/android/layout/ui/EmbeddedLayout.kt
index 084820985..124c27d60 100644
--- a/urbanairship-layout/src/main/java/com/urbanairship/android/layout/ui/EmbeddedLayout.kt
+++ b/urbanairship-layout/src/main/java/com/urbanairship/android/layout/ui/EmbeddedLayout.kt
@@ -127,6 +127,7 @@ public class EmbeddedLayout(
override fun onDestroy(owner: LifecycleOwner) {
// Clean up the view model store when the activity is destroyed.
onDisplayFinished()
+ activity.lifecycle.removeObserver(this)
}
})
@@ -224,15 +225,13 @@ public class EmbeddedLayout(
@MainThread
private fun onDisplayFinished() {
- UALog.v("Embedded content finished displaying! $embeddedViewId")
+ UALog.v("Embedded content finished displaying! $embeddedViewId, $viewInstanceId")
layoutScope.cancel()
EmbeddedViewModelStore.clear()
}
private fun observeLayoutEvents(events: Flow) = layoutScope.launch {
- events
- .filterIsInstance()
- .take(1)
+ events.filterIsInstance()
.collect { dismiss() }
}
diff --git a/urbanairship-layout/src/main/res/values/style_airship_layout.xml b/urbanairship-layout/src/main/res/values/style_airship_layout.xml
index 24a14621b..d5b91e70e 100644
--- a/urbanairship-layout/src/main/res/values/style_airship_layout.xml
+++ b/urbanairship-layout/src/main/res/values/style_airship_layout.xml
@@ -3,7 +3,6 @@
-
diff --git a/urbanairship-message-center/src/main/AndroidManifest.xml b/urbanairship-message-center/src/main/AndroidManifest.xml
index 8cfa9a9d2..c14aa335b 100644
--- a/urbanairship-message-center/src/main/AndroidManifest.xml
+++ b/urbanairship-message-center/src/main/AndroidManifest.xml
@@ -6,12 +6,12 @@
diff --git a/urbanairship-message-center/src/main/res/values/style_message_center.xml b/urbanairship-message-center/src/main/res/values/style_message_center.xml
index 0969db2a9..9e08dc7a8 100644
--- a/urbanairship-message-center/src/main/res/values/style_message_center.xml
+++ b/urbanairship-message-center/src/main/res/values/style_message_center.xml
@@ -2,8 +2,8 @@
-
diff --git a/urbanairship-preference-center/src/main/res/values/style_preference_center.xml b/urbanairship-preference-center/src/main/res/values/style_preference_center.xml
index 1e053d7ed..6abd20197 100644
--- a/urbanairship-preference-center/src/main/res/values/style_preference_center.xml
+++ b/urbanairship-preference-center/src/main/res/values/style_preference_center.xml
@@ -24,7 +24,6 @@