Trusted UI (Trusted Execution Environment or TEE) Implementation

I am trying to implement the PIN entry page using device’s TEE. I have acquired the confidential OEM Documentation. It have some C++ code and some code flow such as creating a TUI Session, start it, do some input processing, then stop and finally terminate it. I have no clue where to put that code.

I am completely new to android (or even to the software dev field), I am completely struct how to continue. Anybody please help me with it, and if there any good resources, please provide.