Version: 1.7
语言 : 中文
Export an OpenHarmony project
Optimize distribution size

Import objects from the exported Tuanjie library

To use Tuanjie as a library (OpenHarmony UAAL), you need to import object from Tuanjie library. After you export project with UAAL mode, you can import object from Tuanjie library, here are some descriptions of the exported objects, you can also find it in exported.ets file .

  • TuanjiePlayerAbilityBase: Extends from UIAbility.
  • TuanjiePlayerView: Tuanjie Player View,you can use it as a component.
  • POST_MESSAGE_TO_HOST: Posts message to host thread (UI).
  • POST_MESSAGE_TO_WORKER: Posts message to worker thread (Tuanjie).
  • APP_KEY_SAFEAREA_RECT: Save the value of safeAreaRect as a key.
  • GetFromGlobalThis: User get global object.
  • SetToGlobalThis: User set global object.
  • Tuanjie: Tuanjie native function, you can use it to interact with the engine.
  • TuanjieLog: Output log message with tuanjie tag.
  • RegisterJSScriptToCSharp: System call module, register jsScript to native code.
  • MSG_RECEIVER: MSG_RECEIVER enum, HOST_UI and WORKER_TUANJIE.
  • LOAD_MODULE: User custom module, allows dynamically loading modules in the HOST or WORKER thread.
  • UNLOAD_MODULE: User custom module, allows dynamically unloading modules in the HOST or WORKER thread.
  • REGISTER_MODULE: User custom module, allows registering modules in the HOST or WORKER thread.
  • UNREGISTER_MODULE: User custom module, allows unregistering modules in the HOST or WORKER thread.
  • REGISTER_HANDLER: After registering handler in the HOST or WORKER thread (only registers once), then you can trigger this handler with POST_MESSAGE_TO_HOST or POST_MESSAGE_TO_WORKER.
  • UNREGISTER_HANDLER: Unregisters a handler in the HOST or WORKER thread.
Export an OpenHarmony project
Optimize distribution size