مجوزها فقط در کنترل کننده های پیش فرض استفاده می شوند
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
چندین عملکرد اصلی دستگاه، مانند خواندن گزارش تماس ها و ارسال پیامک، به دسترسی به اطلاعات حساس کاربر بستگی دارد. برای محافظت از حریم خصوصی کاربر و ارائه کنترل بیشتر کاربران بر اطلاعاتی که به برنامهها در دستگاه خود ارائه میکنند، Google Play دسترسی برنامهها به گروههای مجوز مربوط به تماس و پیامرسانی را محدود میکند.
اگر برنامه خود را در فروشگاه Google Play توزیع میکنید و میخواهید به اطلاعات حساس کاربر مربوط به گزارش تماسها و پیامهای پیامک دسترسی داشته باشید، برنامه شما باید بهعنوان کنترلکننده پیشفرض کاربر برای عملکرد دستگاه اصلی مربوط به آن مجوز ثبت شود، مگر اینکه برنامه شما راضی کند. یکی از موارد استثنایی که در مرکز راهنمای کنسول Play ظاهر می شود. به عنوان مثال، برای دسترسی به مجوزهای مربوط به تماس، برنامه شما باید به عنوان کنترل کننده تلفن یا دستیار پیش فرض کاربر ثبت شود، مگر اینکه برنامه شما یک مورد استثنا را برآورده کند.
این راهنما یک نمای کلی از نحوه دسترسی کاربران به کنترلکنندههای پیشفرض در دستگاههای مجهز به Android ارائه میدهد. سپس این راهنما شرایطی را که یک برنامه قبل از واجد شرایط شدن برای کنترل پیش فرض باید برآورده کند، بررسی می کند. در نهایت، راهنما شما را در فرآیند دریافت رضایت کاربر برای تبدیل شدن به یک کنترل کننده پیش فرض راهنمایی می کند.
برای کسب اطلاعات بیشتر درباره کنترلکنندههای پیشفرض، و همچنین نحوه مدیریت مجوزها در برنامهای که در فروشگاه Play موجود است، به راهنمای خطمشی مجوزها مراجعه کنید .
مجموعه کنترل کننده های پیش فرض را مشاهده و تغییر دهید
اندروید به کاربران اجازه میدهد تا کنترلکنندههای پیشفرض را برای چندین مورد استفاده اصلی، مانند برقراری تماسهای تلفنی، ارسال پیامهای SMS و ارائه قابلیتهای فناوری کمکی تنظیم کنند.
برنامه تنظیمات در اندروید شامل صفحهای است که به کاربران نشان میدهد که کدام برنامهها در حال حاضر کنترلکنندههای پیشفرض برای عملکردهای اصلی دستگاه هستند، همانطور که در شکل 1 نشان داده شده است. از این صفحه، کاربران میتوانند کنترلکننده پیشفرض را برای یک عملکرد معین تغییر دهند، همانطور که در شکل 2 نشان داده شده است.
شکل 1. صفحه تنظیمات سیستم که فهرستی از کنترل کننده های پیش فرض روی یک دستگاه را نشان می دهد.
شکل 2. صفحه تنظیمات سیستم نشان می دهد که چگونه کنترل کننده پیامک پیش فرض را تغییر دهید.
الزامات مربوط به کنترل کننده های پیش فرض را دنبال کنید
با توجه به اطلاعات حساس کاربر که یک برنامه در حین ارائه بهعنوان کنترلکننده پیشفرض به آنها دسترسی پیدا میکند، برنامه شما نمیتواند به یک کنترلکننده پیشفرض تبدیل شود، مگر اینکه فهرستبندی فروشگاه Play و الزامات عملکرد اصلی زیر را برآورده کند:
برنامه شما باید بتواند عملکردی را که کنترل کننده پیش فرض آن است انجام دهد. به عنوان مثال، یک کنترل کننده پیش فرض پیامک باید قادر به ارسال پیامک باشد.
برنامه شما باید یک خط مشی رازداری ارائه دهد.
برنامه شما باید عملکرد اصلی خود را در توضیحات فروشگاه Play مشخص کند. به عنوان مثال، یک کنترل کننده پیش فرض تلفن باید قابلیت های مربوط به تلفن خود را در توضیحات شرح دهد.
برنامه شما باید مجوزهایی را اعلام کند که برای موارد استفاده آن مناسب است. برای جزئیات بیشتر درباره مجوزهایی که میتوانید بهعنوان یک کنترلکننده معین اعلام کنید، به راهنمای استفاده از پیامک یا گروههای مجوز گزارش تماس در مرکز راهنمای کنسول Play مراجعه کنید.
برنامه شما باید قبل از درخواست مجوزهای مرتبط با این کنترل کننده، درخواست کند تا به یک کنترل کننده پیش فرض تبدیل شود. به عنوان مثال، یک برنامه قبل از درخواست مجوز READ_SMS باید درخواست کند تا به عنوان کنترل کننده پیش فرض پیامک تبدیل شود.
درخواست رضایت کاربر
پس از اطمینان از اینکه برنامه شما از هر یک از الزامات لازم برای تبدیل شدن به یک کنترل کننده پیش فرض پیروی می کند، می توانید منطق را برای نمایش گفتگوی نشان داده شده در شکل 3 اضافه کنید. این گفتگو از کاربر می خواهد که برنامه شما را به عنوان کنترل کننده پیش فرض برای یک مورد خاص استفاده کند.
شکل 3. از کاربر می پرسد که آیا می خواهد مدیریت پیامک پیش فرض دستگاه خود را تغییر دهد.
کد مثال زیر منطق لازم برای نمایش اعلانی را نشان می دهد که از کاربر می خواهد مدیریت پیامک پیش فرض دستگاه خود را تغییر دهد:
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-29 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Permissions used only in default handlers\n\n| **Note:** This guide primarily applies to Android app developers who are publishing apps on the [Google Play Store](https://play.google.com/store/apps). However, to protect your users' privacy, it's best to complete the tasks described on this page regardless of where you publish your Android app.\n\nSeveral core device functions, such as reading call logs and sending SMS\nmessages, depend on access to sensitive user information. To protect user\nprivacy and provide users with more control over the information that they\nprovide to apps on their device, Google Play restricts apps' access to call-\nand messaging-related permission groups.\n\nIf you distribute your app on the Google Play Store and want to access sensitive\nuser information related to call logs and SMS messages, your app needs\nto be registered as the user's *default handler* for the core device function\nrelated to that permission, unless your app satisfies one of the\n[exception cases](https://support.google.com/googleplay/android-developer/answer/9047303#exceptions)\nthat appear in the Play Console Help Center. For example, to access\ncall-related permissions, your app needs to be registered as the user's default\nPhone or Assistant handler, unless your app satisfies an exception case.\n\nThis guide provides a brief overview of how users access default handlers on\nAndroid-powered devices. The guide then reviews the requirements that an app\nmust satisfy before becoming eligible to be a default handler. Finally, the\nguide walks you through the process of receiving user consent to become a\ndefault handler.\n\nTo learn more about default handlers, as well as how to handle permissions in an\napp that's available on the Play Store, [see the Permissions policy\nguide](https://play.google.com/about/privacy-security-deception/permissions/).\n\nView and change the set of default handlers\n-------------------------------------------\n\nAndroid lets users set default handlers for several core use cases, such as\nplacing phone calls, sending SMS messages, and providing assistive technology\ncapabilities.\n\nThe Settings app on Android includes a screen that shows users which apps are\ncurrently default handlers for the device's core functions, as\nshown in figure 1. From this screen, users can change the default handler for a\ngiven function, as shown in figure 2. \n**Figure 1.** System settings screen showing list of default handlers on a device. \n**Figure 2.** System settings screen showing how to change the default SMS handler.\n\nFollow requirements for default handlers\n----------------------------------------\n\nGiven the sensitive user information that an app accesses while serving as a\ndefault handler, your app cannot become a default handler unless it meets the\nfollowing Play Store listing and core functionality requirements:\n\n- Your app must be able to perform the functionality for which it's a default handler. For example, a default SMS handler must be able to send text messages.\n- Your app must provide a privacy policy.\n- Your app must make its core functionality clear in the Play Store description. For example, a default Phone handler should describe its phone-related capabilities in the description.\n- Your app must declare permissions that are appropriate for its use case. For more details about which permissions you can declare as a given handler, see the [guidance on using SMS or call log permission\n groups](https://support.google.com/googleplay/android-developer/answer/9047303#intended) in the Play Console Help Center.\n- Your app must ask to become a default handler **before** it requests the permissions associated with being that handler. For example, an app must request to become the default SMS handler before it requests the `READ_SMS` permission.\n\nRequest user consent\n--------------------\n\nAfter ensuring that your app follows each of the requirements necessary to\nbecome a default handler, you can add logic to display the dialog shown in\nfigure 3. This dialog asks the user to make your app the default handler for a\nparticular use case. \n**Figure 3.** Prompt asking the user whether they want to change their device's default SMS handler.\n| **Note:** Your app must ask to become a default handler **before** it requests the permissions associated with being that handler. For example, an app must request to become the default SMS handler before it requests the `READ_SMS` permission.\n\n\nThe following example code shows the logic necessary to display a prompt that\nasks the user to change their device's default SMS handler: \n\n### Kotlin\n\n```kotlin\nval setSmsAppIntent = Intent(Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT)\nsetSmsAppIntent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME, packageName)\nstartActivityForResult(setSmsAppIntent, your-result-code)\n```\n\n### Java\n\n```java\nIntent setSmsAppIntent =\n new Intent(Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT);\nsetSmsAppIntent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME,\n getPackageName());\nstartActivityForResult(setSmsAppIntent, your-result-code);\n```"]]