Enabling and disabling push in Android

There are two different flags that you can set that involve enabling Urban Airship Engage notifications on Android devices.


The first flag on your device is push enabled. This flag controls the ability to receive in-app messages and is enabled by default.  You can read more about how to change this setting by reading our Urban Airship Android Library docs

UAirship.shared().getPushManager().setPushEnabled(true);


The second flag on the device is enable user notifications.  This flag must be set to true if you want the device to receive basic push notification alerts (in the device's notification center).  Setting this flag to true will also set the push enabled flag to true.  You can set the user notifications enabled flag by following our documentation on Enabling User Notifications.

UAirship.shared().getPushManager().setUserNotificationsEnabled(true);


Related Content:

 

 

Was this article helpful?
0 out of 0 found this helpful
Submit a request