Push Notifications

Enabling user notifications and receiving notifications when the app is closed.

Enabling User Notifications

The Airship SDK makes a distinction between “user notifications,” which can be seen by the user, and other forms of push that allow you to send data to your app silently.

Enabling or disabling user notifications is a preference often best left up to the user, so by default, user notifications are disabled. However they are easily enabled with a single call to the PushManager instance.

Enable user notifications (Android Native Bindings)
UAirship.Shared().PushManager.UserNotificationsEnabled = true;
Enable user notifications (iOS Native Bindings)
UAirship.Push().UserPushNotificationsEnabled = true;

Enable user notifications (.Net Standard Library)
Airship.Instance.UserNotificationsEnabled = true;

Xamarin has a known issue with FCM where disconnecting the debugger will prevent notifications from being received on Android. Rebuilding usually resolves this issue.