proomt

Search

Search posts, papers, and topics

All posts

CodeName OneShai Almog5 min readintermediate

UWB and Nearby Devices: Distance, Direction, Association, and Transport

Summary

Codename One introduces three new packages—ranging, companion, and transport—to expose UWB distance/direction, user‑approved device association, and local payload exchange on Android and iOS. The APIs require capability checks, BLE token handshakes, and handle platform limits such as missing cross‑ecosystem transport.

  • Three packages—ranging, companion, transport—are split by capability and gated by `isSupported()` checks.
  • UWB ranging starts after exchanging a BLE token; distance and direction fields are optional and may disappear at range edges.
  • Companion association uses the OS chooser to obtain a durable device ID; Android provides presence events, iOS does not.
  • NearbyTransport maps to Google Nearby Connections on Android and MultipeerConnectivity on iOS; cross‑platform payloads require BLE L2CAP or sockets.

Mobile developers building cross‑platform apps need a clear, safe way to use UWB, device association, and nearby data transfer without hidden platform traps.

6/10

Related reading

  1. Native Drag and Drop Meets Cross-Device Continuity

    Codename One 8.0 adds two user‑experience primitives: **Cross‑Device Continuity** (state checkpointing + Apple Handoff + custom HTTP relay) and **Native Drag‑and‑Drop** (OS‑level drag using the same ClipboardContent model). The post shows the API (StateProvider, Continuity.checkpoint, NativeDragOperation), platform support tables, and practical advice on payload size, security, thread handling, a…

    CodeName Onecodenameone.com7 min
  2. Watch Apps: One Codebase, Two Real Applications

    Codename One now lets you build an Apple Watch or Wear OS companion app from a single codebase by specifying a watchMain class and optional watchStandalone flag. The new WearableConnection API offers putData, sendMessage, and transferFile primitives for asynchronous phone‑watch communication, with simulator support for both platforms.

    CodeName Onecodenameone.com4 min
  3. VoIP, VPN, and the Build System Behind Them

    Codename One’s new builder pipeline can automatically generate the native plumbing required for VoIP call integration, managed VPN profiles, and packet‑tunnel extensions on iOS and Android. By inspecting which Java packages an app imports, the builder adds the necessary frameworks, entitlements, services, and even a separate signed Network Extension for iOS, letting developers keep their signalin…

    CodeName Onecodenameone.com10 min
  4. Android 17 Without the Last-Minute Scramble

    CodeName One prepared for Android 17 (API 37) by addressing platform changes proactively, including fixing version number parsing and implementing the new system-rendered location button. They also added robust PEM key parsing and explicit task removal to simplify common security operations for app developers.

    CodeName Onecodenameone.com8 min
  5. Watch Follow-Through: Complications, Tiles, and a Companion Wear APK

    Codename One 6.5 adds full watch‑face support: surface declarations now generate Apple Watch WidgetKit extensions and Wear OS complication data sources plus ProtoLayout Tiles. A phone‑side `Surfaces.publish()` mirrors descriptors to the watch via WatchConnectivity/Data Layer. Android builds now emit both a phone APK and a Wear‑only APK (or a standalone watch APK). WatchOS build failures were fixe…

    CodeName Onecodenameone.com5 min
  6. SQLite Across Every Port: One Contract, One Encrypted File Format

    Codename One now ships a single, tested SQLite contract that works natively on Android, iOS, Windows, Linux, and in browsers via WebAssembly, with built‑in SQLCipher‑4 encryption supporting three key models. A conformance suite guarantees identical behavior across platforms, and migration helpers let legacy apps opt‑in. The update also adds a proper watch‑app model, DOM‑based text for JavaScript,…

    CodeName Onecodenameone.com11 min