Notification settings
From the Notification Settings window, you can control this package's behavior. Access this window from Unity's main menu: Edit > Project Settings > Mobile Notifications.
Android
The following settings are available for Android notifications.
Reschedule Notifications on Device Restart
By default, scheduled notifications are removed after the device restarts. To preserve scheduled notifications after the device restarts, you need to enable the Reschedule Notifications on Device Restart option. This adds the RECEIVE_BOOT_COMPLETED
permissions to your app's manifest.
Custom Activity
You can enable the Use Custom Activity option to override the activity that opens when the user taps the notification. By default, your app will use UnityPlayerActivity
.
Custom Icons
Add custom icons your app can use for notifications. Whenever you schedule notifications in your script, use the icon ids you define in the list.
iOS
The following settings are available for iOS notifications.
Request Authorization on App Launch
You can configure your app to request authorization in one of two ways:
- From script (see this example for details).
- By enabling the Request Authorization on App Launch option, which makes the app automatically request the authorization when the user launches the app.
Enable Push Notifications
You can enable the Enable Push Notifications options to add the push notification capability to the Xcode project.
You also need to enable this option to retrieve the device token from an AuthorizationRequest.
Include CoreLocation Framework
You must enable the Include CoreLocation Framework option to use the iOSNotificationLocationTrigger. This option adds the CoreLocation
framework to your Xcode project.