Developer Hub / Test adapter

Test without a device

Use a fake capture port to verify inventory and receiving rules in CI before a physical handheld is available.

Publishing standardDevelopers

Connect and validate your application on target hardware.

Business logic tests that do not require an Android device, scanner or vendor binary.

Teams that want fast unit tests and a clean boundary between workflow rules and hardware calls.

Technical content is the core of RuggedLayer. Public resources show reproducible device-interface patterns and the evidence needed to move an existing app toward deployment, while restricted manufacturer SDKs remain behind approved distribution channels.

Comparable device evidence with method, version and limitations.

Developer resourcesTest adapter
RuggedLayer Test LabBeginner
Technical guides, SDK notes, sample apps and compatibility data for connecting existing enterprise applications to rugged Android devices.Teams that want fast unit tests and a clean boundary between workflow rules and hardware calls.
  • A domain function that consumes a normalized capture event.
  • A test framework already running in the project.
  • A clear rule for what should happen with duplicate, empty and invalid values.

Publishing standard

Build and validate enterprise Android integrations with versioned evidence.

Technical content is the core of RuggedLayer. Public resources show reproducible device-interface patterns and the evidence needed to move an existing app toward deployment, while restricted manufacturer SDKs remain behind approved distribution channels.

  1. 01

    Depend on your port, not the device class

    The receiving workflow should know about CaptureEvent and CapturePort. It should not import a scanner manager, broadcast constant or model-specific type.

  2. 02

    Emit deterministic events

    Give the fake adapter explicit methods for a valid scan, duplicate scan, empty value and failure. Tests become readable when the input describes the operator scenario.

  3. 03

    Assert business outcomes

    Check stock movement, validation messages and duplicate handling. Do not assert that a vendor callback was called from a business test; that belongs in the hardware adapter test.

  4. 04

    Keep the hardware test small

    When a device is available, run a focused smoke test for opening, triggering, decoding and closing. The larger workflow suite should remain fast and device-free.

Sample apps / Kotlin

SDK and API patterns

Original test double. It is safe to publish because it does not include a vendor class or binary.

fake-capture-port-test.kt

class FakeCapturePort : CapturePort {
  private var listener: ((CaptureEvent) -> Unit)? = null

  override fun open() = Unit
  override fun start() = Unit
  override fun stop() = Unit
  override fun close() = Unit

  override fun setListener(listener: (CaptureEvent) -> Unit) {
    this.listener = listener
  }

  fun emit(value: String, symbology: String? = "test") {
    listener?.invoke(CaptureEvent(value, symbology, Instant.now()))
  }
}

@Test
fun receiving_a_valid_barcode_updates_stock() {
  val scanner = FakeCapturePort()
  val workflow = ReceivingWorkflow(scanner)

  workflow.start()
  scanner.emit("SKU-001")

  assertEquals(ReceivingState.Accepted("SKU-001"), workflow.state)
}
No vendor binary, API reference, firmware or source sample is published until its redistribution permission and supported scope are recorded.

SDK distribution

Publication gate

No vendor binary, API reference, firmware or source sample is published until its redistribution permission and supported scope are recorded.

Test needs a real device to run

Move hardware setup into a small adapter smoke test and keep domain rules on the fake port.

The same scan is accepted twice

Add an explicit duplicate event and assert the state transition once.

An empty value reaches the repository

Reject at the normalization boundary and expose a user-recoverable state.

How to read the references

Comparable device evidence with method, version and limitations.

  1. 01

    Run the fake adapter tests on every CI build.

  2. 02

    Cover valid, empty, duplicate, oversized and transport-failure cases.

  3. 03

    Keep the device-specific adapter behind one package boundary.

  4. 04

    Run one physical-device smoke test separately for every approved baseline.

Connect and validate your application on target hardware. Connect the approved scanner SDK to CapturePort without changing the receiving workflow.

Resources

SDK and API patterns

No vendor binary, API reference, firmware or source sample is published until its redistribution permission and supported scope are recorded.

Connect and validate your application on target hardware.

Share the non-confidential app workflow, current device and integration path; we will scope the closest validation deliverable.

Connect and validate my application