File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
demos/home-automation/rust Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -674,6 +674,8 @@ jobs:
674674 run : cargo apk build -p usecases --target aarch64-linux-android --lib --release
675675 - name : Build material gallery
676676 run : cargo apk build -p material-gallery --target aarch64-linux-android --lib --release
677+ - name : Build home automation demo
678+ run : cargo apk build -p home-automation --target aarch64-linux-android --lib --release
677679 - name : " upload APK artifact"
678680 uses : actions/upload-artifact@v4
679681 with :
@@ -685,3 +687,4 @@ jobs:
685687 target/release/apk/usecases_lib.apk
686688 target/release/apk/usecases_lib.apk
687689 target/release/apk/slint_material.apk
690+ target/release/apk/home_automation_lib.apk
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ path = "lib.rs"
1919name = " home_automation_lib"
2020
2121[dependencies ]
22- slint = { path = " ../../../api/rs/slint" }
22+ slint = { path = " ../../../api/rs/slint" , features = [ " backend-android-activity-06 " ] }
2323chrono = " 0.4"
2424
2525[features ]
Original file line number Diff line number Diff line change @@ -48,3 +48,10 @@ pub fn main() {
4848
4949 app. run ( ) . expect ( "AppWindow::run() failed" ) ;
5050}
51+
52+ #[ cfg( target_os = "android" ) ]
53+ #[ unsafe( no_mangle) ]
54+ fn android_main ( android_app : slint:: android:: AndroidApp ) {
55+ slint:: android:: init ( android_app) . unwrap ( ) ;
56+ main ( ) ;
57+ }
You can’t perform that action at this time.
0 commit comments