Skip to content

Compatibility and limits

RELEASE CONFIDENCE

Know what runs where.

ApkPy keeps the Previewer and generated Android project on one public API, but a desktop preview is not a device certification. This page separates verified behavior, generated output and application responsibilities.

Supported toolchain

Part Supported range Notes
Python 3.8–3.13 The package declares and tests this range
JDK 17–21 Use apkpy doctor to detect an incompatible JDK
Android SDK Android Studio SDK or apkpy setup A real SDK is required for Gradle compilation
Desktop Previewer Windows, macOS or Linux with Tk support Native device APIs may use a desktop simulation
Android output Java, XML and Gradle project No Python runtime is embedded in the APK

Production Feeds behavior

Capability Previewer Generated Android
Virtual list/grid Reusable pooled widgets Native RecyclerView
End prefetch Viewport threshold RecyclerView.OnScrollListener
Duplicate request guard Loading latch Loading latch
Page insertion Preserves virtual offset notifyItemRangeInserted()
Pull-to-refresh Top gesture and refresh() Native SwipeRefreshLayout
Prepend Preserves visible offset Range insert plus offset restore
Update one item Repaints the affected pooled row notifyItemChanged()
Remove one item Closes the removed position notifyItemRemoved()
Merge/rollback Reconciles the visible dataset Native DiffUtil
Optimistic history Named in-memory snapshots Named in-memory snapshots

Conditional generation

ApkPy scans the current application before adding support code:

Your source uses Generated project receives
Plain virtual_collection() RecyclerView and its adapter
on_end_reached Scroll listener, prefetch threshold and loading latch
on_refresh SwipeRefreshLayout dependency and refresh wrapper
prepend_items() Range insertion and scroll-offset restoration
update_item() / remove_item() Targeted adapter notifications
merge_items() / rollback() DiffUtil helper
Optimistic methods Snapshot maps only for the affected collection

An application that does not use feeds receives none of this runtime.

What was validated for 1.2.2

164transpiler regression checks passed
16focused feed and module checks passed
Gradlethe generated demo compiled into a debug APK
Strict docsthe complete MkDocs site built without warnings treated as errors

The generated Java was inspected for OnScrollListener, notifyItemRangeInserted, notifyItemChanged, notifyItemRemoved, DiffUtil and per-collection optimistic history. A separate plain collection test checks that those helpers are omitted when unused.

These checks prove repeatable generation and compilation. They do not replace testing an application's own backend, device permissions, OEM behavior or release signing.

Deliberate boundaries

Production Feeds does not provide:

  • a backend, cursor format or API authentication;
  • automatic offline synchronization;
  • conflict resolution between REST, WebSocket and local database records;
  • durable optimistic transactions after the process is killed;
  • automatic retry queues or request deduplication by HTTP response ID;
  • Paging 3, Room or Firebase as mandatory dependencies;
  • item-level business rules such as who may edit or delete a record.

This division is intentional. ApkPy provides efficient native collection behavior while the application retains control over product rules and data ownership.

Previewer versus device

Use the Previewer for layout, callbacks, data flow and rapid iteration. Use an Android emulator or physical device before release for:

  • permissions and background restrictions;
  • notification channels and lock-screen controls;
  • hardware codecs, camera, microphone, GPS and Bluetooth;
  • lifecycle behavior after process recreation;
  • network security configuration and certificate behavior;
  • keyboard, accessibility, screen density and manufacturer-specific UI.

If the Previewer and Android differ, preserve the Python API and repair both the Previewer and generator source. Editing generated Java alone is temporary; the next apkpy build replaces it.

Release checklist

  • [ ] Create a new virtual environment and install the built wheel.
  • [ ] Run one small example from the installed package.
  • [ ] Generate a fresh Android project with apkpy build.
  • [ ] Compile the generated project using JDK 17–21.
  • [ ] Test narrow and wide screens in the Previewer and Android.
  • [ ] Test every backend failure path and rollback.
  • [ ] Confirm has_more=False stops repeated page requests.
  • [ ] Check that refresh returns the authoritative first page.
  • [ ] Review the generated manifest and dependencies.
  • [ ] Only then create signing material or publish the package.

Start with the Production Feeds tutorial, then inspect the complete 1.2.2 release notes.

For broader release evidence and the stability contract, continue to Trust and maturity. For the renderer boundary, use Previewer versus Android.