Developer hub / public basics / Technical article
Cash drawer and customer display
Connect counter peripherals only after the base, accessory wiring, power path and display topology are named; the official cash-drawer example is limited to supported device configurations.
Discuss your projectConnect counter peripherals only after the base, accessory wiring, power path and display topology are named; the official cash-drawer example is limited to supported device configurations.
- Model scope
- A named SUNMI counter model, base, cash drawer and customer-facing display. The public cash-drawer example identifies only supported configurations such as the documented T1 case.
- Android version
- Use the target model matrix. Secondary-display behavior follows the Android display and window model for that image.
- Firmware
- Not fixed by the public note. Record the exact SUNMI OS or firmware and accessory firmware where applicable.
- SDK / interface
- IWoyouService or documented ESC/POS raw-command path for the drawer; Android Presentation and DisplayManager for a secondary display.
- Application build
- Record the exact project build and hardware environment before deployment.
What the vendor documentation covers
- SUNMI documents cash-drawer operation through IWoyouService and an ESC/POS or sendRAWData path on supported hardware.
- SUNMI documents secondary-display use with Android Presentation and DisplayManager, including selection of a display with presentation capability.
- The official secondary-display example contains older overlay concepts that need Android-version review before production use.
API surface
IWoyouService cash-drawer operation and open-count querysendRAWData(byte[]) and the documented example open signal 10 14 00 00 00android.hardware.display.DisplayManagerandroid.app.Presentation and Display.FLAG_PRESENTATIONSUNMI Customer API service connection for supported device-management paths
Scope and prerequisites
- Exact counter model, base and accessory part numbers.
- Wiring, power, connection transport and physical installation assumptions.
- Customer-display content, lifecycle and privacy rules.
- Fallback behavior when the drawer or display is unavailable.
Permissions and ownership
- Service binding, raw printer commands and display policy can be restricted by device ownership, firmware and system policy.
- Use the Android runtime permission model for any camera, Bluetooth, USB or network dependency introduced by the accessory path.
- Do not expose device identifiers, drawer credentials or customer content in a public sample.
Error handling
Handle unsupported model, service binding failure, drawer disconnect, failed open signal, duplicate open request, display attach or detach, presentation creation failure, power loss and stale customer-screen state.
Known limitations
- SUNMI explicitly limits external cash-drawer support to supported device configurations; the T1 example is not a catalog-wide claim.
- Secondary-display window and overlay behavior is sensitive to Android version and system policy.
- Accessory availability, wiring and power are project-specific and are not inferred from a product family name.
- This guide is a peripheral integration baseline; a compatibility conclusion belongs to a named project record.
Implementation path
- 01
Name the base model and exact drawer, cable, power and display accessories. Confirm that the model supports an external drawer before designing the application command.
- 02
Choose the documented drawer path: IWoyouService or an ESC/POS raw command through the supported printer or virtual-Bluetooth route. Keep the command behind a device adapter so unsupported models can fail safely.
- 03
Use the documented open signal only after confirming the target hardware and connection path. The T1 example cannot be promoted to a universal SUNMI capability.
- 04
Enumerate displays through DisplayManager and select a real presentation-capable display. Keep primary-screen and secondary-screen lifecycle independent, with an explicit behavior for display attach and detach.
- 05
Render only customer-safe state on Presentation. Avoid relying on the older overlay example without checking the target Android version, window policy and ownership model.
- 06
Define drawer-open acknowledgement, display reconnect, power loss and operator fallback behavior before connecting the workflow to payment or order completion.
- 07
Record accessory serial or identity only in the controlled project test record; public documentation should contain model classes and redacted examples, never customer identifiers.
Verification checklist
- Record model, base, drawer, cable, power path, display, firmware and application build.
- Issue an open command from the exact workflow and verify the physical result and operator acknowledgement.
- Test no drawer, disconnected drawer, repeated command, power cycle and reconnect behavior.
- Attach, detach and rotate or sleep the secondary display where the target workflow requires it.
- Verify that the customer display cannot expose internal diagnostics, credentials or customer records outside the intended view.
- Record the result separately for drawer and display; one peripheral result does not certify the other.
Publication gate
A published note must link a public source, keep claims within that source, show a named acceptance result and exclude private or customer material.
- At least one public source is linked and its retrieval date is recorded.
- Implementation claims stay within the named model, API and vendor-documentation scope.
- UnitWeave test status is shown separately from manufacturer documentation status.
- No private SDK, credential, customer binary, serial number or production data is included.
- A project-specific compatibility or acceptance conclusion still requires a named test record.
License and provenance
Original UnitWeave editorial synthesis with source provenance. No vendor AAR, SO, APK, private SDK, customer binary or production data is redistributed.
Sample reference
No customer accessory fixture or vendor binary is redistributed. Use the linked public documentation as a reference and validate the physical base and peripheral set on the target image.
Source basis
Source provenance
The implementation content is maintained here in UnitWeave structure and wording. Source URLs remain in the provenance record for attribution and version checking; they are not a substitute for the guide.
- How to operate cash drawer on Sunmi deviceSUNMI / The documented cash-drawer AIDL and ESC/POS paths, including the example device boundary. / Sources checked: 2026-08-30Open reference
External SUNMI documentation. Link to the current vendor page; do not redistribute vendor SDK binaries or assume every model shares the same implementation.
- Secondary Display API DocumentationSUNMI / Presentation and DisplayManager guidance for a customer-facing secondary display. / Sources checked: 2026-08-30Open reference
External SUNMI documentation. The page contains older overlay examples; confirm the permission and window behavior against the target Android version before implementation.
- APIs for Printing Instruction SetsSUNMI / ESC/POS and TSPL command paths and label-mode considerations. / Sources checked: 2026-08-30Open reference
External SUNMI documentation. Link to the current vendor page; do not redistribute vendor SDK binaries or assume every model shares the same implementation.
- Overview of SUNMI Customer API SDKSUNMI / Customer API modules, asynchronous service connection and model or device-scope boundaries. / Sources checked: 2026-08-30Open reference
External SUNMI documentation. Link to the current vendor page; do not redistribute vendor SDK binaries or assume every model shares the same implementation.
- Android Presentation referenceAndroid Developers / Presentation windows and display selection for secondary-display UI. / Sources checked: 2026-08-30Open reference
External Android documentation. Apply the guidance to the target Android API level and device policy.
- Android package visibilityAndroid Developers / Package visibility and manifest queries for Android 11 and later. / Sources checked: 2026-08-30Open reference
External Android documentation. Apply the guidance to the target Android API level and device policy.
- SUNMI Device's Android VersionSUNMI / Model-specific Android version information; some models have multiple versions or configurations. / Sources checked: 2026-08-30Open reference
External SUNMI documentation. Link to the current vendor page; do not redistribute vendor SDK binaries or assume every model shares the same implementation.
