개발자는 Android를 통해 앱 내에서 웹의 기능을 활용하여 특정 유형의 콘텐츠를 표시할 수 있는 유연성과 효율성을 누릴 수 있습니다.
이를 통해 기존 웹 콘텐츠를 네이티브 Android 애플리케이션에 원활하게 통합하여 뉴스 피드를 표시하거나, 대화형 튜토리얼을 표시하거나, 광고를 표시하거나, 처음부터 모든 것을 빌드하지 않고도 미니 게임을 호스팅할 수 있습니다.
앱 내에서 인터넷으로 연결되는 창이라고 생각하면 됩니다. 앱에 웹 콘텐츠를 삽입하는 방법은 두 가지가 있습니다.
WebView: UI를 맞춤설정하거나 업데이트할 때 높은 수준의 유연성이 필요한 위치에 인라인으로 제어하는 웹 콘텐츠를 표시합니다.
맞춤 탭: 사용자가 링크를 클릭할 때 외부 브라우저로 이동하는 대신 앱에 사용자를 유지하고 싶을 때 사용자의 기본 브라우저(브라우저 지원 참고)로 구동되는 전체 인앱 탐색 환경으로, 대부분의 탐색 환경이 기본적으로 제공됩니다.
그림 1. WebView (왼쪽)와 맞춤 탭 (오른쪽)의 윤곽선
웹 콘텐츠를 삽입해야 하는 이유
효율성: 웹사이트의 기존 코드를 재사용합니다. 기존 웹 기술과 콘텐츠를 기반으로 빌드합니다.
통합: 앱 내에서 미디어, 광고와 같은 서드 파티 제공업체의 외부 콘텐츠를 활용합니다.
유연성: 미리 정의된 UI에 제한되지 않거나 앱 업데이트를 출시하지 않고도 콘텐츠를 동적으로 업데이트할 수 있습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-08-21(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-21(UTC)"],[],[],null,["# Use web content within your Android app\n\nAndroid allows you as a developer to build on the power of the web within your\napps, so you can benefit from the flexibility and efficiency of being able to\ndisplay certain types of content.\n\nThis lets you seamlessly integrate existing web content into your native\nAndroid application, such as to display a news feed, show interactive tutorials,\ndisplay ads, or even host a mini-game without building everything from scratch.\nThink of it as a window to the internet, from within your app. There are two\nways to embed web content into your app:\n\n- [WebView](/reference/android/webkit/WebView): It displays web content you control inline where you want a high degree of flexibility in customizing or updating the UI.\n- [Custom Tabs](/develop/ui/views/layout/webapps/overview-of-android-custom-tabs): A full in-app browsing experience powered by the user's default browser ([see browser support](https://developer.chrome.com/docs/android/custom-tabs/browser-support)) for when users click a link and you want to keep them in the app, instead of leaving to an external browser, with much of the browsing experience out-of-the-box.\n\n**Figure 1.** WebView (left) and Custom Tab (right) outlined.\n\nWhy embed web content?\n----------------------\n\n- Efficiency: Reuse existing code from your website. Build on existing web technologies and content.\n- Integration: Leverage external content from 3P providers, such as Media, Ads, within your app.\n- Flexibility: Update content dynamically without being constrained to predefined UIs, or without releasing app updates.\n\nWhen to use web content?\n------------------------\n\nThere are three primary uses cases for using the Web in your Android app:\n\n**1. [Embedding web content into your app as primary or supporting content](/develop/ui/views/layout/webapps/embed-web-content-in-app): Use WebView**\n\n- Display your own web content inline as a primary experience where you want a high degree of flexibility in customizing or updating the UI.\n- Display other content such as ads, legal terms and regulations, or other third-party content inline, or as a window within your app experience.\n\n**Figure 2.** Web content embedded within the app with WebViews as primary (left) and supporting content (right).\n\n**2. [In-app browsing](/develop/ui/views/layout/webapps/in-app-browsing-embedded-web?) using Custom Tabs, or WebView for more advanced use cases**\n\n- Have a full in-app browsing experience for when users click a link and you want to keep them in the app, instead of leaving to an external browser.\n - Note: For large screen devices such as tablets and foldables, there are additional options to help apps take advantage of additional space:\n - Apps can open weblinks in split screen using [launch an adjacent multi-window experience](/develop/ui/compose/layouts/adaptive/support-multi-window-mode#launch_adjacent). This enables users to multitask between your app and a browser at the same time. OR\n - Custom Tabs have a side panel option that can open in the same task, but next to your existing app content.\n- The Custom Tab is powered by the user's default browser, for browsers which support Custom Tabs.\n - While it's possible to use a WebView and provide a highly customizable in-app browsing experience, we recommend Custom tabs for an out-of-the-box browser experience and seamless transition for when a user wants to open a web link in the browser.\n\n**Figure 3.** Clicking on an in-app link (left) and opening an in-app browser (right).\n\n**3. Login or Authentication flows within your app**\n\nAndroid's suggested approach is to build your login or authentication flows\nusing [Credential Manager](/identity/sign-in/credential-manager). If you find\nyou still need to use Embedded Web for these experiences, use the following\nguidance:\n\n- Some apps use WebViews to provide sign-in flows for their users, including using a username and passkey (or password) specific to your app. This enables developers to unify the authentication flows across platforms.\n- When linking out to a third-party identity provider or login experience, such as \"Sign in with...\", Custom Tabs are the way to go. Launching Custom Tabs ensures the user's credential remains protected and isolated to the 3rd party site.\n\nFor more information about leveraging WebViews for authentication,\nsee [Authenticate users with WebView](/identity/sign-in/credential-manager-webview).\nFor launching a Custom Tab, see [Overview of Android Custom Tabs](/develop/ui/views/layout/webapps/overview-of-android-custom-tabs).\n**Figure 4.** An in-app login field (left) and a third-party login opened in a Custom Tab (right)."]]