權限遭拒
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
大部分的應用程式都會要求使用者授予特定應用程式權限,待取得授權後才能正常運作。但在某些情況下,使用者可能不會授予權限。
- 他們認為應用程式的核心功能不需要該權限。
- 他們未使用與權限相關聯的功能。
- 他們擔心權限會影響裝置效能。
- 他們單純因為隱私權相關敏感資料等原因而感到不自在。
使用 Android Vitals 評估使用者看法 {#:android-vitals}
Android Vitals 會通知您應用程式收到的權限遭拒次數百分比,協助您測量使用者隱私偏好設定和參與度。透過 Play 管理中心,Android Vitals 會顯示使用者拒絕為應用程式授予權限的每日權限工作階段百分比。
如果應用程式在某一天向使用者要求過至少一項權限,該日即算一個「每日權限工作階段」。當指定的使用者需要對同一權限做出多個決定時,系統只會記錄工作階段結束時的最終決定。
Android Vitals 會在權限群組層級顯示使用者的決定,也會提供評定基準,協助您比較自己的應用程式與 Play 商店中同一類別的其他熱門應用程式。如要瞭解 Google Play 如何收集 Android Vitals 資料,請參閱 Play 管理中心說明文件。
最佳做法
如果拒絕率特別高,就表示使用者認為不需要為了使用應用程式而特別分享自己的個人資訊。有很多方法可以讓使用者更安心地使用您的應用程式。如果按照本節所述的步驟操作,您也許可以降低拒絕率。不過,即使拒絕率降低,也不會完全降低至零,因為使用者有許多不同的個人偏好選擇,而且有些使用者單純只是不想要在任何情況下授予權限。
避免要求不必要的權限
研究顯示,使用者比較喜歡要求較少權限的應用程式。盡可能將權限要求保持在所需的最低限度,不但有助於提高使用者對應用程式的信任,也可以吸引更多使用者選擇安裝。相反地,增加不必要的權限要求,可能會對應用程式在 Play 商店的曝光度造成負面影響。假設某些特定權限並非必要,您或許可以透過其他方法減少應用程式的權限要求次數。請參閱「應用程式權限最佳做法」一文介紹的幾個常見方式。
在背景資訊充足的情況下顯示權限要求
如果是較難理解且並非必要的權限,在背景資訊充足的情況下說明可能比較適合。這麼做可以讓使用者更清楚權限帶來的價值。圖 1 範例顯示如何在背景資訊充足的情況下向使用者說明。
圖 1:在背景資訊充足的情況下說明權限要求
如果應用程式在提供相關功能的背景下提出權限要求,使用者就可以更瞭解價值主張。使用者如果越瞭解,就可能越願意准許權限要求。
如需進一步瞭解有關向使用者說明及要求權限的實用指南,請參閱權限的 Material Design 模式。
說明應用程式需要相關權限的原因
您可以考慮先在背景資訊充足的情況下提出權限要求:針對較難理解的權限提供解釋,可以讓使用者更瞭解需要取得權限的理由。如果使用者先前已拒絕要求,shouldShowRequestPermissionRationale()
公用程式方法會傳回 true。您的應用程式可以使用此方法決定顯示說明的時機。
如要進一步瞭解如何顯示說明字串,請參閱這裡所列的方式來要求應用程式權限。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[null,null,["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Permission Denials\n\nMost apps require that users grant them certain\n[app permissions](/guide/topics/permissions/overview) in order to function\nproperly. However, in some cases, users might not grant the permissions\n\n- They think the permission isn't needed for the app's core functionality.\n- They don't use the functionality associated with the permission.\n- They are concerned about the permission's impacting device performance.\n- They're simply uncomfortable, for example due to sensitivities regarding privacy.\n\nUse Android vitals to gauge user perceptions {#:android-vitals}\n---------------------------------------------------------------\n\nAndroid vitals can help you gauge your users' privacy preferences and engagement\nby informing you about the percentage of permission denials your app\nis receiving. Via the Play console, Android vitals shows the percentage\nof daily permission sessions during which users denied permissions for your app.\n\nA *daily permission session* refers to a day during which your app requested\nat least one permission from a user. When a given user has to make multiple\ndecisions for the same permission, only the final decision at the end of a\nsession is recorded.\n\nAndroid vitals shows you users' decisions at the permission-group\nlevel. Android vitals also provides benchmarks to help compare where your app\nstands with respect to other top apps in the same Play store category.\nFor information on how Google Play collects Android vitals data, see the\n[Play Console documentation](https://support.google.com/googleplay/android-developer/answer/7385505).\n\nBest practices\n--------------\n\nUnusually high denial rates suggest that users don't think the additional\nexposure of their information is worth the benefits offered in return.\nThere are a number of ways to make users feel more comfortable using your app.\nYou might be able to reduce the denial rate if you take\nsteps such as those outlined in this section. However, you shouldn't\nexpect to drive denial rates to zero, because users\nhave diverse personal preferences and some simply don't wish to grant\npermissions under any circumstances.\n\n### Avoid requesting unnecessary permissions\n\nResearch shows that users prefer apps that request fewer permissions.\nKeeping permission requests to the minimum set necessary can help improve user\ntrust in an app, and drive more installs. Conversely, adding unnecessary\npermission requests might negatively impact your app's visibility on the Play\nStore. If\nspecific permissions aren't necessary, you might be able to reduce your app's\nnumber of permission requests through alternative methods. Some common\napproaches are outlined in\n[App Permissions Best Practices](/training/permissions/usage-notes).\n\n### Surface the permission request in context\n\nNon-critical permissions that are less intuitive might benefit from being\nexplained in context. Doing so improves users' comprehension of the value\nderived from the permission. Figure 1 shows an example of educating a user\nin context.\n\n\n**Figure 1.**\nExplaining a permission request in context\n\n\u003cbr /\u003e\n\nUsers understand the value proposition better when the app requests the\npermission in the context of the related functionality.\nThis improved understanding might convince more users to grant permission\nrequests.\n\nFor more information about good guidelines about how to educate users and\nrequest permissions, see the\n[material design pattern for permissions](https://material.io/guidelines/patterns/permissions.html#permissions-denied-permissions).\n\n### Explain why your app needs the permission\n\nConsider starting by requesting your permission in-context: Providing an\nexplanation for less intuitive permissions helps to improve user comprehension\nof the permission. The\n[`shouldShowRequestPermissionRationale()`](/reference/androidx/core/app/ActivityCompat#shouldShowRequestPermissionRationale(android.app.Activity,%20java.lang.String))\nutility method returns true\nif the user has previously denied the request. Your app can use this method to\ndetermine when to show the explanation.\n\nYou can find more details about how to surface explanation strings in\n[Request App Permissions](/training/permissions/requesting)."]]