1. Home
  2. Docs
  3. AndroidBridge
  4. Introduction
  5. How AndroidBridge works?

How AndroidBridge works?

AndroidBridge is based on patent-pending technology by TerraCode that has been in development for now almost two years. It enables connecting two different platforms with different runtimes and languages with complete support for multithreading, polymorphism e.g. extending classes of one language in another while automatically managing memory and providing automatic garbage collection.

This is how it works for AndroidBridge in a nutshell:

  • Tiny runtimes are added as endpoints for bridge in each language being bridged.
  • A ‘code generator’ generates Android/JAVA stub code for use in Unity/C#. This provides the required APIs available for call in Unity. The generated stub code contains glue code to connect the APIs to endpoints.
  • Runtimes at each end manage method calls, object creations, garbage collection etc
  • Communication between endpoints can be switched depending on various factors e.g. IPC, sockets and even files can be used to communicate between endpoints.
Was this article helpful to you? Yes No

How can we help?