Skip to content

Android deployment

Lucas Moura Belo edited this page Jan 14, 2022 · 10 revisions

How to deploy Python within a Delphi Android application

The Android demo directory provides a sample of how to deploy Python with your Delphi Android applications. Python 3.9 is also availabe as an Android cross-compiled version within this repo. Fell free to use it or create your our deployable Python3 version.

Using cross-compiled Python3.9

The Android demo uses PyDistFinder to locate and easely deploy Python3.9 with a Delphi Android application. The Android CameraPreviewDemo also provides an overview in how to deploy Python3.9 and use the interoperability between Delphi and Python.

Setting up your environment

Before using one of the demos available under Android demos, open PyDistFinder project and compilet it. It is used in the pre-build event of the related demos projects.

Notes:

  • The libpythonX.X.so must be deployed at the same remote path as your Delphi Android application. This is already set in the deployment configuration of the demos projects.

Running a sample

After building the PyDistFinder project, just make sure you've configured the Android SDK in your Delphi IDE and attach your device. After doing so, you're able to deploy and run the sample project.

Additional Python versions

You can find Python [3.8.0, 3.9.0 and 3.10.0] for Android in the python3-android project repository.