You must associate your user’s PII with the user ID and channel ID from the Xamarin MCE library. Registration details about the user ID and channel ID are available after the device is registered. You can also access these details through the UserID(), ChannelID(), and AppKey() methods. After you obtain the registration details, persist the channel ID and user ID within your app’s user table.

  • Only Xamarin.Forms is supported.

      To access registration details in Xamarin, subscribe to delegate methods by specifying a method to be called or a block of code to be executed. You can subscribe to changes in registration by using the following code:

      SDK.Instance.RegistrationUpdated += UpdateRegistration; 

      Then, use the UpdateRegistration method to retrieve the UserID and the ChannelID:

      public void UpdateRegistration() 
      UserId.Detail = SDK.Instance.UserId (); 
      ChannelId.Detail = SDK.Instance.ChannelId (); 
      AppKey.Detail = SDK.Instance.AppKey (); 

      For example, to obtain the current AppKey, use the following code:

      Debug.WriteLine("AppKey is " + SDK.Instance.AppKey

      For example, to obtain the current UserID, use the following code:

      Debug.WriteLine("UserId is now " +
                      SDK.Instance.UserId ());

      For example, to obtain the current ChannelID, use the following code:

      Debug.WriteLine("ChannelId is now " +
                      SDK.Instance.ChannelId ());

      Go Back to the Mobile App Messaging home page.

      Join The Discussion

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