class_jnisingleton.rst 1.6 KB

12345678910111213141516171819202122232425262728293031
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the JNISingleton.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_JNISingleton:
  6. JNISingleton
  7. ============
  8. **Inherits:** :ref:`Object<class_Object>`
  9. Singleton that connects the engine with Android plugins to interface with native Android code.
  10. Description
  11. -----------
  12. The JNISingleton is implemented only in the Android export. It's used to call methods and connect signals from an Android plugin written in Java or Kotlin. Methods and signals can be called and connected to the JNISingleton as if it is a Node. See `Java Native Interface - Wikipedia <https://en.wikipedia.org/wiki/Java_Native_Interface>`__ for more information.
  13. Tutorials
  14. ---------
  15. - `Creating Android plugins <../tutorials/platform/android/android_plugin.html#doc-android-plugin>`__
  16. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  17. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  18. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  19. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  20. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  21. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`