[[["เข้าใจง่าย","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-09-03 UTC"],[],[],null,["Android lets you build on the power of the web within your apps. So, you can\nbenefit from the flexibility and efficiency of being able to display certain\ntypes of content.\n\nThis lets you seamlessly integrate existing web content into your Android\napp, 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\nThere are several benefits to embedding web content in your app:\n\n- **Efficiency**: Reuse existing code from your website. Build on existing web technologies and content.\n- **Integration**: Use external content from third-party providers, such as media and 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\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):\nUse `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 \\`WebView\\`s 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\nuse 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\n 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 `WebView`s 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 a `Custom Tab` helps protect the user's credential by keeping it isolated to the third-party site.\n\nFor more information about using `WebView`s 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\n4.** An in-app login field (left) and a third-party login opened in a \\`Custom Tab\\` (right)."]]