Package com.chaquo.python.android
Class AndroidPlatform
- java.lang.Object
-
- com.chaquo.python.Python.Platform
-
- com.chaquo.python.android.AndroidPlatform
-
public class AndroidPlatform extends Python.Platform
Platform for Chaquopy on Android.
-
-
Constructor Summary
Constructors Constructor Description AndroidPlatform(Context context)Uses theApplicationcontext of the given context to initialize Python.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationgetApplication()Returns the Application context of the context which was passed to the contructor.StringgetPath()Returns the value to assign toPYTHONPATH, ornullto leave it unset.voidonStart(Python py)Called after Python is started.
-
-
-
Constructor Detail
-
AndroidPlatform
public AndroidPlatform(@NotNull Context context)Uses theApplicationcontext of the given context to initialize Python.
-
-
Method Detail
-
getApplication
@NotNull public Application getApplication()
Returns the Application context of the context which was passed to the contructor.
-
getPath
@NotNull public String getPath()
Description copied from class:Python.PlatformReturns the value to assign toPYTHONPATH, ornullto leave it unset. The default implementation returnsnull.- Overrides:
getPathin classPython.Platform
-
onStart
public void onStart(@NotNull Python py)Description copied from class:Python.PlatformCalled after Python is started. The default implementation does nothing.- Overrides:
onStartin classPython.Platform
-
-