docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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 only use the active activity in your app. If more than one activity is available, it will either use UnityPlayerActivity or UnityPlayerGameActivity (Starting from Unity 2023.1), depending on their availability.

    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.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)