Stay organized with collections
Save and categorize content based on your preferences.
firebase::messaging::MessagingOptions
#include <messaging.h>
A class to configure the behavior of Firebase Cloud Messaging.
Summary
This class contains various configuration options that control some of Firebase Cloud Messaging's behavior.
Public attributes
suppress_notification_permission_prompt
bool firebase::messaging::MessagingOptions::suppress_notification_permission_prompt
If true, do not display the prompt to the user requesting permission to allow notifications to this app.
If the prompt is suppressed in this way, the developer must manually prompt the user for permission at some point in the future using RequestPermission()
.
If this prompt has already been accepted once in the past the prompt will not be displayed again.
This option currently only applies to iOS and tvOS.
Public functions
MessagingOptions
firebase::messaging::MessagingOptions::MessagingOptions()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-23 UTC.
[null,null,["Last updated 2024-01-23 UTC."],[],[],null,["# firebase::messaging::MessagingOptions Struct Reference\n\nfirebase::messaging::MessagingOptions\n=====================================\n\n\n`#include \u003cmessaging.h\u003e`\n\nA class to configure the behavior of Firebase Cloud Messaging.\n\nSummary\n-------\n\nThis class contains various configuration options that control some of Firebase Cloud Messaging's behavior.\n\n| ### Constructors and Destructors ||\n|---|---|\n| [MessagingOptions](#structfirebase_1_1messaging_1_1_messaging_options_1a06a963c548d00be65b157f909e3a389f)`()` Default constructor. ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|\n| [suppress_notification_permission_prompt](#structfirebase_1_1messaging_1_1_messaging_options_1a271b720f0fdfc7394a7e47b1c04dca87) | `bool` If true, do not display the prompt to the user requesting permission to allow notifications to this app. |\n\nPublic attributes\n-----------------\n\n### suppress_notification_permission_prompt\n\n```c++\nbool firebase::messaging::MessagingOptions::suppress_notification_permission_prompt\n``` \nIf true, do not display the prompt to the user requesting permission to allow notifications to this app.\n\nIf the prompt is suppressed in this way, the developer must manually prompt the user for permission at some point in the future using [RequestPermission()](/docs/reference/cpp/namespace/firebase/messaging#namespacefirebase_1_1messaging_1abb0bdae9b9173ae0eb7901401f5f8a51).\n\nIf this prompt has already been accepted once in the past the prompt will not be displayed again.\n\nThis option currently only applies to iOS and tvOS.\n\nPublic functions\n----------------\n\n### MessagingOptions\n\n```c++\n firebase::messaging::MessagingOptions::MessagingOptions()\n``` \nDefault constructor."]]