> For the complete documentation index, see [llms.txt](https://developers-apps-in-toss.toss.im/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers-apps-in-toss.toss.im/documentation/sdk/domains-api/screen/screen.setawakemode.md).

# Screen.setAwakeMode

> 함수형 API `setScreenAwakeMode`로도 같은 기능을 쓸 수 있어요.

### 기능 설명

화면이 항상 켜져 있도록 설정하거나 해제해요. 웹툰, 동영상, 문서 읽기 등 화면을 계속 켜 두어야 할 때 유용해요.

`enabled`를 `true`로 설정하면 화면이 꺼지지 않고, `false`로 설정하면 기본 화면 보호기 시간에 따라 꺼져요. 앱 전체에 영향을 미치므로, 특정 화면에서만 쓰려면 화면을 벗어날 때 이전 상태로 복구해 주세요.

### 타입

```ts
Screen.setAwakeMode(options: SetScreenAwakeModeOptions): Promise<{ enabled: boolean }>;
```

**Params**

```ts
interface SetScreenAwakeModeOptions {
  enabled: boolean;
}
```

**Response**

적용된 상태를 `{ enabled: boolean }` 형태로 반환해요.

### 예시 코드

```js
import { Screen } from "@apps-in-toss/web-framework";

// 미디어 콘텐츠 화면에 진입할 때 항상 켜짐 모드를 켜요.
await Screen.setAwakeMode({ enabled: true });

// 화면을 벗어날 때 이전 상태로 복구해요.
window.addEventListener("pagehide", () => {
  Screen.setAwakeMode({ enabled: false });
});
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers-apps-in-toss.toss.im/documentation/sdk/domains-api/screen/screen.setawakemode.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
