Class AndroidPlatform


  • public class AndroidPlatform
    extends Python.Platform
    Platform for Chaquopy on Android.
    • Constructor Detail

      • AndroidPlatform

        public AndroidPlatform​(@NotNull
                               Context context)
        Uses the Application 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 to PYTHONPATH, or null to leave it unset. The default implementation returns null.
        Overrides:
        getPath in class Python.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 class Python.Platform