Preference Center

 Important

Airship preference centers are widgets that can be embedded in a page in an app or website. Please verify with your legal team that your full preference center page, including any web page for email preference centers, is compliant with local privacy regulations.

AirshipPreferenceCenter

Airship’s SDK provides a simple interface for managing the Preference Center within your react native application.

Displaying the Preference Center
UrbanAirship.openPreferenceCenter("preferenceCenterId");
Overriding the Preference Center
UrbanAirship.setUseCustomPreferenceCenterUi(true);
Retrieve the Preference Center config
PreferenceCenterConfig preferenceCenterConfig = UrbanAirship.getConfiguration("preferenceCenterId");
Retrieve the channel subscription lists
SubscriptionList subscriptionList = UrbanAirship.getSubscriptionLists(subscriptionListTypes);
List<String>? channelSubscriptionLists = subscriptionList.channelSubscriptionLists; 
Retrieve the contact subscription lists
SubscriptionList subscriptionList = Airship.getSubscriptionLists(["channel"]);
List<ContactSubscriptionList>? contactSubscriptionList = subscriptionList.ContactSubscriptionList; 
Edit the channel subscription lists
UrbanAirship.editChannelSubscriptionLists()
        .subscribe("food")
        .unsubscribe("test")
        .apply()
Edit the contact subscription lists
UrbanAirship.editContactSubscriptionLists()
        .subscribe("food", "sms")
        .unsubscribe("test", "email")
        .apply()