Updated the BufferStreamsDemoApp UI to jetpack compose.
The project is no longer using Java and now the MainActivity uses
Kotlin, calling JNI from Kotlin is fairly simiar.
Currently there are 3 empty demo screens, the first demo screen will
call a JNI function but there is no support for logs.
Bug: 296272152
Test: Built and ran on device.
Change-Id: I92f0951899fb6379e1506abdc8e1d67002433787
diff --git a/libs/bufferstreams/examples/app/Android.bp b/libs/bufferstreams/examples/app/Android.bp
index 0ecf94c..d6305f8 100644
--- a/libs/bufferstreams/examples/app/Android.bp
+++ b/libs/bufferstreams/examples/app/Android.bp
@@ -14,14 +14,33 @@
android_app {
name: "BufferStreamsDemoApp",
- srcs: ["java/**/*.java"],
+ srcs: ["java/**/*.kt"],
sdk_version: "current",
jni_uses_platform_apis: true,
jni_libs: ["libbufferstreamdemoapp"],
use_embedded_native_libs: true,
+ kotlincflags: [
+ "-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
+ ],
+
+ resource_dirs: ["res"],
static_libs: [
+ "androidx.activity_activity-compose",
"androidx.appcompat_appcompat",
+ "androidx.compose.foundation_foundation",
+ "androidx.compose.material3_material3",
+ "androidx.compose.runtime_runtime",
+ "androidx.compose.ui_ui",
+ "androidx.compose.ui_ui-graphics",
+ "androidx.compose.ui_ui-tooling-preview",
+ "androidx.core_core-ktx",
+ "androidx.lifecycle_lifecycle-runtime-ktx",
+ "androidx.navigation_navigation-common-ktx",
+ "androidx.navigation_navigation-compose",
+ "androidx.navigation_navigation-fragment-ktx",
+ "androidx.navigation_navigation-runtime-ktx",
+ "androidx.navigation_navigation-ui-ktx",
],
}