proomt

Search

Search posts, papers, and topics

All posts

CodeName OneShai Almog4 min readintermediate

Put App Documents in the System File Browser

Summary

Codename One adds a read‑only DocumentProvider API that lets apps publish a virtual file tree to iOS Files and Android’s storage picker. The tree is defined with `DocumentNode` objects, can include remote‑only entries, and is shared via an App Group container. The iOS extension runs in a separate process, so the model is serialized and read independently; Android uses the same model inside the ap…

  • Use `DocumentProvider.publish(root)` to expose a curated, read‑only document hierarchy to the system file browsers.
  • Nodes can be local (`setPath`) or remote (`setRemoteId`); remote fetches use a token‑based endpoint defined via `DocumentProvider.setRemoteEndpoint`.
  • The iOS File Provider extension reads a serialized index from an App Group container; the app can terminate after publishing.
  • Updates require republishing a new tree; clearing with `DocumentProvider.clear()` removes the location (e.g., on logout).

Exposes in‑app documents to the native file ecosystem without giving the app full filesystem access, improving user workflow (preview/share) while keeping a tight security boundary. The remote‑node support enables on‑demand fetching, useful for cloud‑backed storage scenarios.

6/10

Related reading

  1. 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
  2. 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
  3. App Hardening: One Obfuscation Pipeline Across Every Port

    Codename One adds a cloud‑side hardening step that runs on the merged JAR before it is split into Android, iOS, JavaScript, and desktop binaries. It can rename symbols, encrypt string literals, and insert opaque‑predicate control‑flow guards at configurable levels (off → standard → aggressive → paranoid). The transforms are selective per platform to avoid breaking optimizers, and a mapping is kep…

    CodeName Onecodenameone.com6 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. Inside ZCode: Silently uploading your Git history to the cloud

    ZCode (Zhipu’s AI coding desktop) silently archives your entire workspace—including full .git history, LFS cache, and config—encrypts it with a server‑supplied RSA public key, and uploads the ciphertext directly to Aliyun OSS. The upload runs unconditionally for any logged‑in user, cannot be disabled via UI, and the decryption key lives only on the server, giving Zhipu full read access to your co…

    Hacker News front pageferstar.org6 minpostmortemHN336113