proomt

Search

Search posts, papers, and topics

All posts

CodeName OneShai Almog5 min readintermediate

The Hard Part of Invite a Friend Is the Install

Summary

Codename One adds an invitation API that preserves a unique code through the install process on Android (via Play Install Referrer) and iOS (via App Clip) into the analytics stack. Create an Invite, register a listener at startup, and set a few build hints to get exact attribution without fingerprinting.

  • Use `Invites.create` with `InviteRequest` to generate a local code and register it; sharing works offline.
  • Three handoff paths—direct, Android install‑referrer, iOS App Clip—deliver the exact invitation code to the installed app.
  • Register an `InviteListener` and call `Invites.checkForInvite()` in `start()` to receive attribution before UI loads.
  • Add platform build hints (Android signing SHA‑256, iOS App Store ID, enable Associated Domains/App Clip) to wire the flow.

Any mobile developer building referral or invite flows needs reliable, privacy‑respecting attribution across install on Android and iOS.

6/10

Related reading

  1. 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
  2. We Stopped Waiting for Platform Changes to Find Us

    Codename One added a daily automated scan of Apple and Google deprecation notices, linking each notice to concrete builder artifacts before work is created. The system caught the Android 16 back‑gesture change and enabled a permission‑free ContactPicker, turning policy shifts into repeatable, evidence‑backed patches.

    CodeName Onecodenameone.com3 min
  3. 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
  4. 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
  5. App Intents: One Java Declaration for Siri, Spotlight, and Shortcuts

    Codename One adds @AppIntent annotations that let a static Java method be exposed as a Siri, Spotlight, or Android shortcut. The build‑time processor generates native declarations, a reflection‑free dispatch table, and validates the intent metadata. Handlers can be headless, accept typed parameters, return results, and be invoked internally via Intents.invoke(). Entities enable system‑driven disa…

    CodeName Onecodenameone.com5 min
  6. Fill an SMS Verification Code Without Reading the Inbox

    Codename One adds a one‑time‑code autofill component that leverages iOS, Android, and browser autofill APIs, eliminating the need for SMS‑reading permissions. The new `PhoneVerification` component handles phone entry, code entry, resend timing, and server callbacks, while the UI uses a single hidden editor to back six visual boxes, improving typing, paste, and accessibility. The post explains the…

    CodeName Onecodenameone.com3 min