Codename One API

2099 documented types across 176 packages. Search the API from the site search, or download the whole reference as a zip.

com.codename1.adsThe modern, pluggable Codename One advertising API.
com.codename1.ads.spiService provider interface (SPI) for the Codename One advertising API.
com.codename1.aiCodename One’s AI / LLM client surface plus the value types, streaming primitives, and chat-binding helpers that sit on top of it.
com.codename1.ai.inferenceReusable on-device inference sessions for .tflite models.
com.codename1.ai.languageVendor-neutral on-device language identification, translation, and smart reply.
com.codename1.ai.visionVendor-neutral on-device vision APIs for still images and live camera frames: barcodes and QR codes, OCR, faces, image labels, body pose, person segmentation, and document correction.
com.codename1.analyticsThe analytics API tracks how your application is used in the field through a generic provider SPI.
com.codename1.annotationsCodename One specific Java annotations used by the build pipeline and the ParparVM bytecode translator to mark methods and classes for special treatment – e.g. opting individual call sites out of debug info or null/array-bounds checks, declaring asynchronous methods, or forcing a class to be treated as concrete during devirtualization.
com.codename1.annotations.buildhintsBuild hints expressed as annotations, so the compiler checks them.
com.codename1.annotations.graphqlAnnotations for declaring type safe GraphQL clients.
com.codename1.annotations.grpcgRPC-Web client annotations.
com.codename1.annotations.restAnnotations for declaring type safe REST clients.
com.codename1.appreviewApp review & feedback engagement API.
com.codename1.arCross-platform augmented reality: world tracking, plane detection, hit testing, anchors, 3D content placement, light estimation, image tracking and face tracking, backed by ARKit on iOS and ARCore on Android.
com.codename1.backgroundBackground fetch is a mechanism whereby an application is granted permission by the operating system to update its data periodically.
com.codename1.bindingRuntime entry points for the build-time component-binding framework.
com.codename1.bluetoothCross-platform Bluetooth API: adapter state, runtime permissions and capability queries.
com.codename1.bluetooth.classicClassic Bluetooth (BR/EDR): inquiry discovery (ClassicDiscovery), bonded-device listing and RFCOMM stream connections (RfcommConnection, RfcommServer).
com.codename1.bluetooth.gattThe client-side GATT model discovered on a remote peripheral: GattService, GattCharacteristic (read/write/subscribe), GattDescriptor, notification listeners and ATT status codes.
com.codename1.bluetooth.leBLE central role: scanning (BluetoothLE, ScanSettings, ScanFilter, ScanResult, BleScan), connections and the GATT client (BlePeripheral, connection events) and L2CAP connection-oriented channels (L2capChannel, L2capServer).
com.codename1.bluetooth.le.serverBLE peripheral role: the local GATT server (GattServer, GattLocalService, GattLocalCharacteristic, request envelopes) and advertising (AdvertiseSettings, AdvertiseData, BleAdvertisement).
com.codename1.calendarCross-platform access to local device calendars and explicitly registered online calendar sources.
com.codename1.callSystem call integration: making a call this app carries look, to the operating system and to the user, like a call the phone itself placed.
com.codename1.call.directoryNaming and blocking numbers, for calls this app has nothing to do with.
com.codename1.call.sessionReporting calls to the operating system, and hearing what the user does with them.
com.codename1.call.spiThe seam between the portable com.codename1.call API and each platform’s native call stack.
com.codename1.call.voipRinging when the app is not running.
com.codename1.cameraSession based camera API for live preview, photo capture and video recording.
com.codename1.capturePackage for capturing photos, audio or video from the camera/microphone.
com.codename1.carPortable in-car UI for Apple CarPlay and Google Android Auto.
com.codename1.car.spiInternal service-provider interface for the com.codename1.car in-car API.
com.codename1.chartsThe main ChartComponent Package
com.codename1.charts.compatThis package contains compatibility classes for internal use
com.codename1.charts.modelsProvides the classes that handle the data values (data model) to be used by displaying the charts.
com.codename1.charts.renderersProvides renderer classes that keep the chart rendering / drawing styles.
com.codename1.charts.transitionsAnimated transitions between chart series states.
com.codename1.charts.utilUtility classes that provide helper methods used by most of the other packages.
com.codename1.charts.viewsProvides the classes that handle the actual rendering / drawing of the charts, based on the provided model and renderer.
com.codename1.cloudLegacy cloud / property-binding hooks.
com.codename1.codescanDeprecated!!: Please use the cn1-codescan library instead.
com.codename1.compat.java.utilCompatibility shims for java.util APIs that are not available on every Codename One target.
com.codename1.componentsGeneric elaborate components that make use of both UI elements and storage.
com.codename1.contactsProvides access to the contacts list from the device address book
com.codename1.continuitySaves what the user was doing and brings it back – after the operating system kills the app, and on the other devices that person owns.
com.codename1.continuity.spiThe platform seam of the continuity framework.
com.codename1.continuity.syncA small key/value store the platform carries between the devices one person is signed in to, for the handful of durable choices that should follow them everywhere.
com.codename1.crashOn device crash protection client for Codename One applications.
com.codename1.dbSQLite database access, with optional encryption at rest.
com.codename1.documentsExposes an app’s documents to the system file browser – the Files app on iOS and the storage picker on Android – so its content is browsable, and openable by other apps, without the app being launched.
com.codename1.documents.spiThe platform seam of the document provider framework.
com.codename1.facebookLegacy generic implementation of the Facebook API with simplified OAuth integration to allow social sharing.
com.codename1.facebook.uiUser interface for integrating with basic Facebook features currently mostly the Like button
com.codename1.gamingGame oriented APIs for Codename One.
com.codename1.gaming.levelThe saved-level / map model behind the Codename One game builder.
com.codename1.gaming.physics2D rigid body physics for Codename One games.
com.codename1.gaming.physics.box2d.callbacksListener and callback interfaces for the box2d physics engine (contact, query, ray cast and debug draw callbacks).
com.codename1.gaming.physics.box2d.collisionCollision detection primitives (AABBs, manifolds, distance and time of impact queries) for the box2d physics engine.
com.codename1.gaming.physics.box2d.collision.broadphaseBroad phase collision detection (dynamic tree and pair management) for the box2d physics engine.
com.codename1.gaming.physics.box2d.collision.shapesCollision shape definitions (circle, polygon, edge and chain) for the box2d physics engine.
com.codename1.gaming.physics.box2d.commonMath and utility types (vectors, matrices, transforms and engine settings) shared across the box2d physics engine.
com.codename1.gaming.physics.box2d.dynamicsRigid body dynamics core (world, bodies, fixtures and the constraint solver) for the box2d physics engine.
com.codename1.gaming.physics.box2d.dynamics.contactsContact constraints and contact solving for the box2d physics engine.
com.codename1.gaming.physics.box2d.dynamics.jointsJoint constraints (revolute, prismatic, distance, weld and others) for the box2d physics engine.
com.codename1.gaming.physics.box2d.poolingObject pooling abstractions used to avoid allocations in the box2d physics engine.
com.codename1.gaming.physics.box2d.pooling.arraysPooled reusable arrays used by the box2d physics engine.
com.codename1.gaming.physics.box2d.pooling.normalDefault object pool implementations for the box2d physics engine.
com.codename1.gaming.physics.box2d.pooling.stacksStack based object pools used by the box2d physics engine.
com.codename1.gpuLow level GPU accelerated graphics API for Codename One.
com.codename1.healthCross-platform health data: reading and writing samples, aggregating them over time, watching the store for changes, and recording workouts.
com.codename1.health.nutritionLogged food and drink, as a sparse set of nutrient amounts.
com.codename1.health.sensorsStandard Bluetooth SIG health sensors – heart-rate straps, power meters, speed and cadence sensors, foot pods, thermometers, scales, blood-pressure cuffs and glucose meters.
com.codename1.health.workoutWorkout recording, live where the operating system supports it and framework-recorded everywhere else.
com.codename1.homeA cross-platform smart-home API: read the home’s accessories, read and write what they can do, watch them for change, run scenes, and add new Matter accessories.
com.codename1.home.commissioningAdding a new Matter accessory to the user’s home.
com.codename1.home.spiThe service-provider interface each platform port implements to back SmartHome.
com.codename1.intentsApp intents: the capabilities your application offers to the world outside it.
com.codename1.intents.spiThe platform seam of the app intents framework.
com.codename1.ioNetworking, Storage, Filesystem & related API’s
com.codename1.io.bonjourBonjour / mDNS-SD service discovery and publication.
com.codename1.io.graphqlGraphQL client runtime.
com.codename1.io.grpcgRPC-Web client runtime.
com.codename1.io.gzipgzip support based on https://github.com/ymnk/jzlib
com.codename1.io.oidcOpenID Connect (OIDC) client with PKCE.
com.codename1.io.restSimplified REST API
com.codename1.io.servicesDefault WebService implementations
com.codename1.io.tarTar support allowing us to package multiple separate files into a single package which is useful in supporting hierarchies in a portable way.
com.codename1.io.usbUSB host-mode device access.
com.codename1.io.webauthnWebAuthn / passkey client.
com.codename1.io.wifiWiFi inspection, scanning, connection and peer-to-peer (WiFi Direct).
com.codename1.javascriptNOTE: The com.codename1.javascript package is now deprecated.
com.codename1.l10nThe Localization API allows developers to adapt their applications to different geographic locales and conventions.
com.codename1.locationAbstraction of location services (GPS/Geofencing etc.) providing user global positioning and monitoring over such changes both in the foreground and background.
com.codename1.mappingRuntime entry points for the build-time JSON / XML mapping framework.
com.codename1.mapsThe mapping API allows developers to use maps in their applications, add layers on top of the map and to enhance the API with additional Layers, Providers and functionality.
com.codename1.maps.layersThe Layers are elements that are displayed on the map.
com.codename1.maps.providersThese are the map providers, currently http://www.openstreetmap.org/ is supported.
com.codename1.maps.routingRoad-following routes for the modern maps API.
com.codename1.maps.spiThe maps service-provider interface (SPI).
com.codename1.maps.vectorThe pure-vector map rendering engine that backs MapView.
com.codename1.mcpModel Context Protocol (MCP) headless API for Codename One applications.
com.codename1.mediaVideo and Audio playback support are handled within this package using the com.codename1.media.Media & com.codename1.media.MediaManager APIs.
com.codename1.messagingSend e-mail messages through underlying platforms e-mail clients or thru the Codename One cloud.
com.codename1.nearbyNearby devices: how far away one is, which one is yours, and how to send it something.
com.codename1.nearby.companionCompanion-device association: telling the operating system which accessory is yours, and getting privileges back for it.
com.codename1.nearby.rangingUltra-wideband precision ranging: how far away another device is, and in which direction.
com.codename1.nearby.spiThe service-provider interface each port implements to carry com.codename1.nearby onto the platform’s short-range stacks.
com.codename1.nearby.transportSending bytes and files to a device in the same room, with no access point, no pairing and no internet.
com.codename1.nfcNear Field Communication (NFC) API: read and write NDEF messages, exchange APDUs with contactless smart cards, and host-emulate as a card.
com.codename1.notificationsLocal Notification API
com.codename1.ormRuntime entry points for the build-time SQLite ORM.
com.codename1.paymentIn-App Billing/Purchase API’s are abstracted by this package.
com.codename1.pluginPlugin SPI for extending core framework behaviour without subclassing.
com.codename1.plugin.eventTyped events dispatched to plugins.
com.codename1.printingCross platform printing: hand a PDF or image file to the platform printing system, which shows the native print dialog where the user picks a printer and confirms the job.
com.codename1.processingXPath based expression language designed to assist in JSON/XML parsing/generating
com.codename1.propertiesHigh level property objects that allow us to replace getters/setters in business objects with more convenient storage/parsing mappings while retaining type safety.
com.codename1.pushTyped push notification registration, delivery, and custom transport APIs.
com.codename1.routerPop-navigation and deep-link routing support.
com.codename1.securityCryptographic primitives and conveniences: hashing, message authentication, symmetric/asymmetric encryption, digital signatures, JWTs, OTPs and random number generation.
com.codename1.security.hardeningRead-only reporting of Codename One App Hardening status for the current build.
com.codename1.security.shieldAPI shielding: attestation tokens, over-the-air certificate pinning, and runtime self-protection reporting.
com.codename1.security.shield.spiService-provider interface between the public shield API and the attestation engine.
com.codename1.sensorsCross platform access to the device motion sensors and high level gesture detection.
com.codename1.shareSharing services, that can be registered on the ShareButton
com.codename1.socialConnectors for native social network SDK’s
com.codename1.surfacesExternal surfaces: home-screen widgets and live activities from one declarative API.
com.codename1.surfaces.spiThe platform seam of the external surfaces framework.
com.codename1.systemLow level calls into the Codename One system, including support for making platform native API calls.
com.codename1.testingThis package contains everything necessary for unit tests, automation of tests and everything in between.
com.codename1.uiMain widget package containing the component/container “composite” similar both in terminology and design to Swing/AWT.
com.codename1.ui.accessibilityDefines the portable accessibility semantics tree for Codename One’s lightweight user-interface components.
com.codename1.ui.animationsAll components are animatable by potential and additional animations (unrelated to a specific component) can be installed on the fly, transitions between forms are also handled as part of this package.
com.codename1.ui.cssRuntime CSS theme compilation.
com.codename1.ui.editorThe pure Codename One text editing engine that backs com.codename1.ui.RichTextArea and com.codename1.ui.CodeEditor.
com.codename1.ui.eventsObservable pattern event listeners in the spirit of AWT 1.1’s event dispatching architecture, all events are dispatched on the EDT (Event Dispatch Thread).
com.codename1.ui.geomContains classes related to geometry locations and calculations such as rectangle and size
com.codename1.ui.htmlThis package is deprecated and used only for legacy support, use the WebBrowser component from the components package.
com.codename1.ui.layoutsLayout managers allow a com.codename1.ui.Container to arrange its components by a set of rules that adapt to specific densities (ppi - pixels per inch).
com.codename1.ui.layouts.migCodename One port of the MiG Layout manager.
com.codename1.ui.listLists are highly customizable and serve as the basis for com.codename1.ui.ComboBox and other components (such as carousels etc) they employ a similar MVC approach to Swing including the renderer pattern, notice that we strongly discourage usage of lists
com.codename1.ui.paintercom.codename1.ui.Painter allows us to draw arbitrary elements of graphics from plain/scaled/tiled images to gradients and pretty much any form of graphic drawing we can imagine.
com.codename1.ui.plafLook of the application can be fully customized via this package, it represents a rendering layer that can be plugged in separately in runtime and themed to provide any custom look.
com.codename1.ui.sceneThis package provides a light-weight scene graph for Codename One.
com.codename1.ui.spinnerSpinners allows picking of simple sequential values similarly to combo boxes but of a much wider value set.
com.codename1.ui.tableTable component for editing and viewing tabular data and arranging Codename One components in a tabular form
com.codename1.ui.treeTree component for displaying hierarchy based information and its related classes
com.codename1.ui.utilUtility features that are either too domain specific or don’t “fit” into any other packages including the Resource file format loading API.
com.codename1.ui.validationThe validation framework allows us to mark invalid input in text components and disable components in the case of invalid input
com.codename1.utilGeneral utilities classes
com.codename1.util.promiseJavaScript-style Promise for asynchronous Codename One code.
com.codename1.util.regexA simple regular expression API that is portable across all platforms
com.codename1.vpnInstalling and controlling a VPN configuration.
com.codename1.vpn.profileAsking the operating system to run a standard VPN tunnel.
com.codename1.vpn.spiThe seam between the portable com.codename1.vpn API and each platform’s native VPN machinery.
com.codename1.vpn.tunnelWriting the tunnel itself, rather than asking the system to run one.
com.codename1.vrVirtual reality and 360 media built entirely on the portable com.codename1.gpu pipeline and com.codename1.sensors motion sensors - no platform SDK dependency, so everything here runs wherever Display#isGpuSupported() is true, including the simulator.
com.codename1.wearableTalking between a phone app and its watch app.
com.codename1.wearable.spiInternal service-provider interface for the com.codename1.wearable phone-to-watch API.
com.codename1.xmlThe XML package allows parsing XML documents into DOM objects.
java.io
java.lang
java.lang.annotation
java.lang.invoke
java.lang.ref
java.lang.reflect
java.net
java.nio.charset
java.text
java.time
java.time.format
java.time.temporal
java.util
java.util.concurrent
java.util.concurrent.atomic
java.util.function
java.util.stream