Registration details contain all of the properties that are related to the SDK registration.

The registration details properties are not available until the device is registered. Registration initially happens within seconds of first launching your mobile app; however, you can obtain Watson Campaign Automation registration details in the Delegate by using the following methods.

public async void UpdateRegistration()
{
    string userId = null;
    string channelId = null;
    string channelUri = null;
    
    if (IBMMobilePush.Util.RegistrationDetails.MceRegistered())
    {
        userId = IBMMobilePush.Util.RegistrationDetails.UserId.ToString();
        channelId = IBMMobilePush.Util.RegistrationDetails.ChannelId.ToString();
    }
    
    if (RegistrationDetails.ProviderRegistered())
    {
        channelUri = IBMMobilePush.Util.RegistrationDetails.ChannelUri.ToString();
    }
    
}

public RegistrationPage()
{
    this.InitializeComponent();
    IBMMobilePush.SDK.Instance.RegistrationUpdated += UpdateRegistration;
}

Delegate is required if you want to know immediately when the device registers with the MCE servers. You can also query the user ID and channel ID from the registration details.

Go Back to the Mobile App Messaging home page.

Join The Discussion

Your email address will not be published. Required fields are marked *