Class: Firebase::Admin::Messaging::AndroidConfig
- Inherits:
-
Object
- Object
- Firebase::Admin::Messaging::AndroidConfig
- Defined in:
- lib/firebase/admin/messaging/android_config.rb
Overview
Android-specific options that can be included in a Message.
Instance Attribute Summary collapse
-
#collapse_key ⇒ String?
Collapse key string for the message.
-
#data ⇒ Hash{String,Symbol => String}?
A hash of data fields to be included in the message.
-
#fcm_options ⇒ AndroidFCMOptions?
Options for features provided by the FCM SDK for Android.
-
#notification ⇒ AndroidNotification?
Android notification to be included in the message.
-
#priority ⇒ String?
Priority of the message.
-
#restricted_package_name ⇒ String?
Package name of the application where the registration tokens must match in order to receive the message.
-
#ttl ⇒ Numeric?
Time-to-live duration of the message in seconds.
Instance Method Summary collapse
-
#initialize(collapse_key: nil, priority: nil, ttl: nil, restricted_package_name: nil, data: nil, notification: nil, fcm_options: nil) ⇒ AndroidConfig
constructor
Initializes an AndroidConfig.
Constructor Details
#initialize(collapse_key: nil, priority: nil, ttl: nil, restricted_package_name: nil, data: nil, notification: nil, fcm_options: nil) ⇒ AndroidConfig
Initializes an Firebase::Admin::Messaging::AndroidConfig.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/firebase/admin/messaging/android_config.rb', line 57 def initialize( collapse_key: nil, priority: nil, ttl: nil, restricted_package_name: nil, data: nil, notification: nil, fcm_options: nil ) self.collapse_key = collapse_key self.priority = priority self.ttl = ttl self.restricted_package_name = restricted_package_name self.data = data self.notification = notification self. = end |
Instance Attribute Details
#collapse_key ⇒ String?
Returns Collapse key string for the message. This is an identifier for a group of messages that can be collapsed, so that only the last message is sent when delivery can be resumed. A maximum of 4 different collapse keys may be active at a given time.
10 11 12 |
# File 'lib/firebase/admin/messaging/android_config.rb', line 10 def collapse_key @collapse_key end |
#data ⇒ Hash{String,Symbol => String}?
Returns A hash of data fields to be included in the message. All keys and values must be strings. When provided, overrides any data fields set on the top-level message.
27 28 29 |
# File 'lib/firebase/admin/messaging/android_config.rb', line 27 def data @data end |
#fcm_options ⇒ AndroidFCMOptions?
Returns Options for features provided by the FCM SDK for Android.
35 36 37 |
# File 'lib/firebase/admin/messaging/android_config.rb', line 35 def @fcm_options end |
#notification ⇒ AndroidNotification?
Returns Android notification to be included in the message.
31 32 33 |
# File 'lib/firebase/admin/messaging/android_config.rb', line 31 def notification @notification end |
#priority ⇒ String?
Returns Priority of the message. Must be either ‘high` or `normal`.
14 15 16 |
# File 'lib/firebase/admin/messaging/android_config.rb', line 14 def priority @priority end |
#restricted_package_name ⇒ String?
Returns Package name of the application where the registration tokens must match in order to receive the message.
22 23 24 |
# File 'lib/firebase/admin/messaging/android_config.rb', line 22 def restricted_package_name @restricted_package_name end |
#ttl ⇒ Numeric?
Returns Time-to-live duration of the message in seconds.
18 19 20 |
# File 'lib/firebase/admin/messaging/android_config.rb', line 18 def ttl @ttl end |