Class PushNotificationSettings
A class for configuring the Push Notifications SDK.
Some of the fields in this class are platform specific, and are prefixed with the platform they relate to. However, it is not required to use a separate settings object on each platform, as the SDK will automatically only retrieve settings for the platform it is running on.
Inherited Members
Namespace: Unity.Services.PushNotifications
Assembly: Unity.Services.PushNotifications.dll
Syntax
public class PushNotificationSettings : ScriptableObject
Fields
firebaseAppID
The application ID for a Firebase application to be used for Android's Firebase Cloud Messaging API. This can be found in your Firebase dashboard.
Declaration
[FormerlySerializedAs("androidApplicationId")]
public string firebaseAppID
Field Value
Type | Description |
---|---|
string |
firebaseProjectID
The project ID for a Firebase project to be used for Android's Firebase Cloud Messaging API. This can be found in your Firebase dashboard.
Declaration
[FormerlySerializedAs("androidProjectId")]
public string firebaseProjectID
Field Value
Type | Description |
---|---|
string |
firebaseProjectNumber
The sender ID to be used for Android's Firebase Cloud Messaging. This can be found in your Firebase dashboard.
Declaration
[FormerlySerializedAs("androidSenderId")]
public string firebaseProjectNumber
Field Value
Type | Description |
---|---|
string |
firebaseWebApiKey
The API key for a Firebase project to be used for Android's Firebase Cloud Messaging API. This can be found in your Firebase dashboard.
Declaration
[Header("Android (Firebase) Settings")]
[FormerlySerializedAs("androidApiKey")]
public string firebaseWebApiKey
Field Value
Type | Description |
---|---|
string |
Methods
GetAssetInstance()
Retrieves the copy of the settings persisted as an asset. Will return an empty settings object if no asset is available. The settings in this asset can be updated in the Editor from Project Settings > Services > Push Notifications.
Declaration
public static PushNotificationSettings GetAssetInstance()
Returns
Type | Description |
---|---|
PushNotificationSettings | The settings persisted as an asset in the project, or a blank object if no settings are persisted. |