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 theApplication
context of the given context to initialize Python.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Application
getApplication()
Returns the Application context of the context which was passed to the contructor.String
getPath()
Returns the value to assign toPYTHONPATH
, ornull
to leave it unset.void
onStart(Python py)
Called after Python is started.
-
-
-
Constructor Detail
-
AndroidPlatform
public AndroidPlatform(@NotNull Context context)
Uses theApplication
context 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.Platform
Returns the value to assign toPYTHONPATH
, ornull
to leave it unset. The default implementation returnsnull
.- Overrides:
getPath
in classPython.Platform
-
onStart
public void onStart(@NotNull Python py)
Description copied from class:Python.Platform
Called after Python is started. The default implementation does nothing.- Overrides:
onStart
in classPython.Platform
-
-