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 Cordova application.

Displaying the Preference Center
UAirship.openPreferenceCenter("preferenceCenterId")
Overriding the Preference Center
UAirship.setUseCustomPreferenceCenterUi("preferenceCenterId", true)
Retrieve the Preference Center config
UAirship.getPreferenceCenterConfig("mouna", function(result) {
    //Use the preference center config
    console.log("getPreferenceCenterConfig" + result)
})
Retrieve the channel subscription lists
UAirship.getChannelSubscriptionLists(function(channelSubscriptionLists) {
    //Use the channel subscription lists
    console.log(channelSubscriptionLists)
})
Retrieve the contact subscription lists
UAirship.getContactSubscriptionLists(function(contactSubscriptionLists) {
    //Use the contact subscription lists
    console.log(contactSubscriptionLists)
})
Edit the channel subscription lists
UAirship.editChannelSubscriptionLists()
        .subscribe("food")
        .unsubscribe("test")
        .apply()
Edit the contact subscription lists
UAirship.editContactSubscriptionLists()
        .subscribe("food", "sms")
        .unsubscribe("test", "email")
        .apply()