[[["容易理解","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-07-27 (世界標準時間)。"],[],[],null,["# Private space\n\n**Figure1.**The private space can be unlocked and locked to show or hide\nsensitive apps on a device.\n\n\nPrivate Space enables users to create a secure, isolated environment on\ntheir device to keep sensitive apps away from prying eyes. Apps in the\nprivate space show up in a separate container in the launcher, and are hidden from\nthe recents view, notifications, settings, and from other apps when the private\nspace is locked.\n\n\nThe sandboxed space is a separate Android profile\nWhen the end user adds or installs an app inside private space, the app is\ninstalled in this new Android profile. The system treats this as a fresh app\ninstall, and no app data is copied over to the private space. When the space\nis locked, the private profile user is stopped, and when the space is unlocked,\nthe user is started.\n\n\nApps in the private space are installed as separate copies of the apps in\nthe main space. User content (user-generated or downloaded)\nand user accounts are separated between the private space and the main space.\nYou can use the system Sharesheet and the Photo Picker to give apps\naccess to content across spaces only when the private space is\nunlocked.\n\n\nPrivate space is based on the\n[Android\nmulti-user model](/docs/devices/admin/multi-user) and adds the following\n[profile](/docs/devices/admin/multi-user#categories_of_profiles)\nand [usertype](/docs/devices/admin/multi-user#user_types):\n\nProfile:\n: Private\n\nUser type:\n: `android.os.usertype.profile.PRIVATE`\n\nSettings and Launcher apps\n--------------------------\n\nYou need to update settings and launcher apps to support lock, unlock,\nand hidden states. When private space is locked, the launcher provides an\nentry point to unlock it (except in the hidden state). When private space\nis **locked**, the settings app must not reveal the existence\nof private space.\n\nUse [`LauncherApps#getLauncherUserInfo`](https://developer.android.com/reference/android/content/pm/LauncherApps#getLauncherUserInfo(android.os.UserHandle))\nto identify the private profile user. Launcher apps need to register the [locked\nstate](https://developer.android.com/reference/android/content/Intent#ACTION_PROFILE_UNAVAILABLE) and the [unlocked\nstate](https://developer.android.com/reference/android/content/Intent#ACTION_PROFILE_AVAILABLE) and change the state of private space in their UI when these broadcasts are received.\nBoth of these broadcasts have an extra constant called [`EXTRA_USER`](https://developer.android.com/reference/android/content/Intent#EXTRA_USER)\nthat you can use to refer to the private profile user.\n\nLauncher apps can use the [`UserManager.isQuietModeEnabled`](https://developer.android.com/reference/android/os/UserManager#isQuietModeEnabled(android.os.UserHandle))\nmethod to check the private profile state.\n\nPrivate profile\n---------------\n\nThe private profile adds the new profile type\n`android.os.usertype.profile.PRIVATE`\nfor use with private space. The private profile can exist on the same device\nas a work profile and a clone profile. It is a sandboxed space separate from the\nmain Android user. When the private space is unlocked the apps become visible\nin settings, Sharesheet, photo picker, and DocsUI. The apps inside private space\naren't shown in any of these surfaces when private space is locked.\nPrivate space can have only one instance on a single device, and can\nexist only for the main user (not for secondary users or within other\nprofiles).\n\nPermissions\n-----------\n\nLauncher apps must have\n[`android.permission.ACCESS_HIDDEN_PROFILES`](https://developer.android.com/reference/android/Manifest.permission#ACCESS_HIDDEN_PROFILES)\npermission and the [`android.app.role.RoleManager.ROLE_HOME`](https://developer.android.com/reference/android/app/role/RoleManager#ROLE_HOME)\nrole to access private profiles.\n\n\nImplementations not using the AOSP launcher need to modify their launcher\nto add support for private profile. Read more about developing a launcher app\nwith private space at\n[Launcher\napps on our developers site](https://developer.android.com/about/versions/15/behavior-changes-all#private-space-launcher-apps).\n\nIntents\n-------\n\nTelephony intents are routed to the main user and display a notification.\nAll other intents are limited to private profile, and are not redirected."]]