Skip to main content

shernova_ui 2.8.0 copy "shernova_ui: ^2.8.0" to clipboard
shernova_ui: ^2.8.0 copied to clipboard

PlatformAndroid

Optional UI components for Shernova phone verification.

2.8.0 #

  • Fair-queue visibility: the queued view now shows the session's rank from the server's queue contract — "Your place in line: {position} of {total}" (queue_position_line, EN/AR via the parity-locked copy). An older server that omits queue_position hides the line; nothing else changes.
  • Explicit cancel: a Cancel verification / إلغاء التحقق button now sits under the queue card and the call button for every live pending session (queued or waiting). It stops polling, DELETEs the session so its queue slot frees immediately, and leaves the flow; failures fall back to the session's own TTL. Server-gated by the new cancel_button_enabled behavior flag (fallback ON — absent flag is byte-identical to 2.7.0 behaviour).
  • Requires shernova_core ^2.1.0 (queue fields on ShernovaSession). Locked by tests: the position line rendering, the cancel tap (DELETE + pop), the flag-off suppression, and the absent-field default.

2.7.0 #

  • Remote behavior flags: the waiting screen now reads behavior_flags from the server's poll_config contract (shernova_core 2.0.9) and applies them live — busy_retry_enabled (default on: retry a refused dialer-open with the existing capped backoff), auto_dial_on_booking_enabled (default on: the booking press also dials; off leaves the explicit "Call to verify" button as the dial path), cancel_session_on_edit_enabled (default on: leaving to edit the number DELETEs the waiting session; off lets it retire on TTL for reuse), bring_to_foreground_on_idle_enabled (default on: terminal-state and idle foreground pushes, now also pushed to the native call-end launcher so the switch covers the Kotlin path), and auto_redial_after_call_ended_enabled (default OFF). Every fallback matches the shipped behaviour exactly — an old server or no contract changes nothing.
  • auto_redial_after_call_ended_enabled (default off) is the server-side escape hatch for the retired hang-up redial: when the server explicitly opts in, a call that ended while the session still waits schedules the same capped, backoff-delayed busy retry used for dialer-open failures. The static shouldAutoRedialAfterCallEnded invariant stays always-false and all existing no-redial tests pass unchanged for the default (flag absent) path.
  • Dialer-open fallback is failure-safe: an exception from the url_launcher fallback now counts as a failed placement (feeding the existing retry gate) instead of escaping as an unhandled async error.
  • The poll intervals are re-read after the booking's token refresh, so a locale-triggered re-fetch mid-flow cannot leave the session on stale intervals.
  • Locked by tests: flag-off for auto-dial/cancel-on-edit/busy-retry/foreground (including the native handshake), flag-on redial, and the absent-contract defaults. Requires shernova_core ^2.0.9.

2.6.3 #

  • Reads the server runtime contract from shernova_core 2.0.9: polling intervals, the confirmation-window length, and the request timeout are applied from the server's poll_config on the waiting screen (identical values to 2.6.2 when the server omits the field).
  • Maintenance mode surfaces through the existing friendly error screen: when the server announces maintenance, starting a verification shows the server's bilingual maintenance message instead of booking a session. Sessions already in flight keep polling normally.
  • Requires shernova_core ^2.0.9. No other UI changes; 28 tests pass unchanged.

2.6.2 #

  • One-press verification: a single tap on "Call to verify" books the session and opens the dialer in one step (no intermediate copy of the screen). Queued sessions keep the queue UI and dial only after the server promotes the session and assigns a line.
  • The "not verified yet" options (wrong number / expired) only appear after a real call attempt has ended — never while the call is still being attempted, so users cannot race the attempt with a premature "start over".
  • Full EN/AR copy: every screen string resolves the server's localized copy first and falls back to built-in English/Arabic defaults (LocalizedText), fixing English helper text leaking into Arabic apps (the hint under "اتصل الآن لتأكيد الرقم", the expired/wrong-number bodies, and the English rate_limit dialog).
  • Friendly error handling in place: the error screen retries from the same screen instead of dumping raw text; network loss shows the translated network body (new network_error_body), 429s show bilingual "try later" copy from the server, and technical identifiers/codes are never rendered. wrongNumberHint / expiredBody get an explicit fontSize: 14 (they were inheriting the 48px bodyLarge).
  • Requires shernova_core ^2.0.8 for network_unavailable normalization and bilingual localizedMessage. Locked by 28 tests, including server-copy-first resolution and the queued-dial invariants.

2.6.1 #

  • Queued sessions (every verification line busy): the waiting screen now renders a dedicated queue state instead of crashing with type 'Null' is not a subtype of type 'String' in type cast. A "Assigning a free line…" card replaces the gateway-number card, the call button is hidden until the server promotes the session, and the queued body/status strings (queued_body / queued_status / queued_card_label, server-localized) explain the wait. Polling keeps running; as soon as promotion assigns a line the dial UI appears with the number. "Edit phone number" stays available while queued. Requires shernova_core ^2.0.6.
  • Terminal-state foreground return (Android): verified / expired / mismatch outcomes now bring the host app to the foreground when it is backgrounded, instead of relying only on the call-end idle event. Covers the dropped idle on MIUI, a denied call-state listener, and the user leaving the app after the call ended but before the terminal state arrived. No-op when the app is already in the foreground.
  • Deliberately no call hang-up: after a safety review the SDK does not attempt to end the verification call itself. TelecomManager.endCall takes no call id and could not be proven to hit only this session's call (dropped idle events make the placed-call flag stale, and concurrent/dual-SIM calls are realistic on MIUI), and the required ANSWER_PHONE_CALLS runtime grant would add a user-facing permission for a best-effort UX fix. The gateway reject and the user hanging up stay the hang-up paths.
  • Lock both behaviours with tests: queued screen without a dial button, the promoted line appearing from polling, never dialing while queued, surfacing a backgrounded host app on success/expiry, never forcing an already-foregrounded app, and staying inert without auto-return. No change to the always-false auto-redial invariant or to any session-matching rule.

2.6.0 #

  • Compact, scroll-free verification layout: the waiting screen now fits in a single SafeArea + Column with MainAxisAlignment.spaceBetween (no SingleChildScrollView), vertical paddings/margins reduced ~30%, and a smaller gateway-number card — the call button and footer stay visible on any screen size.
  • Bottom status copy is now server-driven (waiting_status); the Arabic default is "في انتظار اتصالك...". The Shernova logo + "التحقق عبر Shernova" footer stays pinned at the bottom.
  • Gentle post-call state (unconfirmed): new title/body ("لم يتم التحقق!" / "يرجى الاتصال من نفس الرقم المسجل، أو قم بتعديل الرقم للمحاولة مجدداً.", server-overridable via unconfirmed_title / unconfirmed_body), the old waiting body is hidden in this state, and "Edit phone number" is now a clear OutlinedButton instead of a plain text button.
  • Mismatch screen uses the same non-accusatory copy and an OutlinedButton for "Edit phone number"; the layout is scroll-free (spaceBetween + SafeArea).
  • Fix the >10 s delay on the confirming state when the call comes from a different number: the post-call confirmation window is now a ~5 s budget (15 burst ticks × 350 ms) instead of 40 ticks (14 s). The server never rejects an unmatched ring by design, so the old window only ever stalled those users in "Confirming your call…". After the window the gentle options appear while the regular 900 ms poll keeps running, so a late matching ring still verifies. No auto-redial behaviour changed.

2.5.0 #

  • Stop reopening the dialer after the call ends while the session is still waiting (registered 01091009115, called from e.g. SIM 01091009110): no automatic redials after hang-up at all — the old busy-redial loop only ever re-woke the dialer for a session nobody could confirm.
  • Keep polling alive while the session waits; after the existing confirmation window, show a gentle bilingual hint (“We couldn’t confirm your number yet…”) with Call to verify (manual retry) and Edit phone number — never an accusation of a wrong SIM on the waiting screen.
  • “Edit phone number” now cancels the still-waiting session before leaving the screen, so the host app cannot resurrect the retired session on the next attempt (the server would otherwise replay it via the same client request id / same-phone reuse).
  • Guard against stale poll responses: a response belonging to a session that has since been replaced is ignored.
  • Lock the invariant with tests: shouldAutoRedialAfterCallEnded always returns false (mirroring the server-side always-false guards), plus widget tests covering no-redial, polling continuity, manual retry, edit-number lifecycle, and peer-session isolation.

2.4.6 #

  • Professional busy-line handling: after a verification call ends, wait briefly for the server to record the ring; if the session is still waiting, auto-redial with backoff (up to 5 attempts) and show busy status/hint.
  • Never auto-redial on verified, expired, rejected, or mismatch UI.

2.4.5 #

  • After the user edits the number in the host app and verifies again, start the native call + auto-return service on every Android session — not only the first time EventChannel listening succeeds.

2.4.4 #

  • Restore mismatch as a return-to-host flow: “Edit phone number” closes verification so the client app can change the signup number. The SDK no longer edits the phone itself (that left the host form on the old number and crashed afterVerified).
  • Keep the mismatch screen above “Completing verification…”, and still return null instead of throwing Bad state.

2.4.3 #

  • Keep the mismatch screen from flashing “Completing verification…”.
  • Editing the phone number stays inside verification so auto-return still works; closing without success no longer throws Bad state.

2.4.2 #

  • Stop treating a hung-up verification call as a busy line. Wrong-number calls show the mismatch screen (or a same-SIM hint) and never auto-open the dialer.

2.4.1 #

  • Do not treat a hung-up call as a busy line until the API has been polled. Calling from a different number shows the mismatch screen again instead of a busy retry.

2.4.0 #

  • Automatic retry when the verification call hits a busy line, with status text from the API (shernova_core 2.0.2+).
  • Faster polling after returning from the dialer so verification completes more reliably.
  • Fix missing _burstTicks field that prevented the package from compiling.
  • Restore RETURN_CHANNEL_ID so the Android plugin compiles on all host apps.

2.3.0 #

  • Server-driven branding: footer logo and sizes come from API ui_theme (via shernova_core 2.0.1+) — update logo/size on Shernova without client app rebuilds. Bundled asset remains offline fallback.

2.2.1 #

  • Removed OEM setup dialog — no more scary MIUI/OPPO setup popup before verification.
  • Call button always active — returning to the verification screen no longer dims "Call to verify" for 10–15 seconds.
  • Silent auto-return — removed the "Verification call ended / Returning to the app…" heads-up notification; return uses background strategies only.
  • Quieter foreground service — verification listen notification is low-importance (no pop-up).

2.2.0 #

  • MIUI/Xiaomi auto-return overhaul: poll TelephonyManager.callState every 250ms from foreground service (callbacks alone are unreliable on MIUI); aggressive multi-retry return via moveTaskToFront, PendingIntent with background-activity-start allowed (Android 14+), explicit Flutter activity component, full-screen intent, and return trampoline activity.
  • Native dial/call: placeVerificationCall() uses ACTION_CALL when CALL_PHONE is granted (best return behavior on OEM phones) else ACTION_DIAL instead of external url_launcher.
  • OEM setup prompt: one-time MIUI/OPPO/Vivo battery + autostart guidance before verification.

2.1.0 #

  • Android auto-return (MIUI / OEM fix): foreground service keeps call-state listening alive while the dialer is open; fixed manifest receiver action (PHONE_STATE_CHANGED); moveTaskToFront + return trampoline for reliable automatic app restore after the verification call — no extra tap required on Samsung-class and Xiaomi-class devices when permissions are granted.

2.0.1 #

  • Test and live verification screens now use the same UX: call button, copy, and user-facing copy.
  • Removed developer-only sandbox banner and test-mode layout branch from VerifyPhoneScreen.
  • Fixed bottom overflow on small screens with scrollable content.

2.0.0 #

  • Depends on shernova_core ^2.0.0.
  • Removed hardcoded Simulate Ring fallback strings; test mode uses API UI strings (real call flow).
0
likes
140
points
539
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Optional UI components for Shernova phone verification.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, shernova_core, url_launcher

More

Packages that depend on shernova_ui

Packages that implement shernova_ui