> For the complete documentation index, see [llms.txt](https://violetxf.gitbook.io/messengerbot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://violetxf.gitbook.io/messengerbot/api2/app.md).

# App

메신저봇 앱의 컨텍스트를 얻어야 하거나, UI Thread 작업이 필요할 때 사용합니다.

| Public methods          |                                                                                                                                                                                                   |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| android.content.Context | <p><strong>getContext()</strong></p><p>어플리케이션 Context를 반환합니다.</p>                                                                                                                                 |
| void                    | <p><strong>runOnUiThread(task: Function, onComplete: Function)</strong></p><p>task를 UIThread에서 호출합니다. task가 끝나면, onComplete를 호출합니다.</p><p>onComplete에는 error:Throwable과 task의 반환값이 인자로 주어집니다.</p> |
