Skip to content

F02 Present No-Codes screen - #16

Merged
nichmorgan merged 7 commits into
mainfrom
feature/f02-show-screen
Sep 12, 2026
Merged

nichmorgan merged 7 commits into
mainfrom
feature/f02-show-screen

Conversation

@nichmorgan

Copy link
Copy Markdown
Owner

Summary

  • Add show_screen(context_key) (sync, fire-and-present) requiring prior initialize
  • Android JNI: NoCodes.getSharedInstance().showScreen; iOS Swift host hops to main and calls NoCodes.shared.showScreen(withContextKey:)
  • README snippet + unit tests for empty key / not initialized / unsupported platform

Closes #5

Test plan

  • cargo test (6 tests, including new show_screen cases)
  • Manual: on Android/iOS after F01 init, call show_screen("your_context_key") and confirm the No-Codes screen presents
  • Confirm empty/whitespace context key returns InvalidConfig
  • Confirm call before initialize returns NotInitialized

Made with Cursor

nichmorgan and others added 7 commits September 12, 2026 02:43
Add sync show_screen(context_key) that fire-and-presents via JNI /
Swift host. Context key is always an app parameter; finished events stay F03.

Co-authored-by: Cursor <cursoragent@cursor.com>
Improve readability by formatting the JNI thread attachment and environment enum value retrieval in a more concise manner. This change enhances code clarity while maintaining functionality.
Use attach_current_thread closures, jni_str/jni_sig macros, and Env instead of the 0.21 AttachGuard style so the crate compiles for Android targets.

Co-authored-by: Cursor <cursoragent@cursor.com>
showScreen and initialize were running on the Rust/JNI worker thread,
so the paywall Activity never appeared. Post work via Handler on the
main looper (DefineClass NativeRunnable) and load SDK classes through
the Activity ClassLoader when FindClass fails off the UI thread.

Co-authored-by: Cursor <cursoragent@cursor.com>
Mirror the iOS Swift host: apps compile DioxusQonversionHost.kt and Rust only JNI-calls initialize/showScreen.

Co-authored-by: Cursor <cursoragent@cursor.com>
Package DioxusQonversionHost in an android/ library module and emit
AndroidArtifact metadata so apps get the Kotlin host without copy/paste.

Co-authored-by: Cursor <cursoragent@cursor.com>
@nichmorgan
nichmorgan merged commit b738efa into main Sep 12, 2026
1 check passed
@nichmorgan
nichmorgan deleted the feature/f02-show-screen branch September 12, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

F02 — Present No-Codes screen

1 participant