Developer

Consuming SAP Mobile Place with the Mobile Place UI

Use the Mobile Place UI to consume SAP Mobile Place.

Prerequisites

Add the MobilePlace library to your product using Start of the navigation path Project's References Next navigation step Manage NuGet Packages End of the navigation path.

The following dependent library will also be installed as a NuGet package:
  • SAP.Supportability

Procedure

  1. Consume Mobile Place in your page. For example:
    <Page 
       xmlns:mobilePlace=”using:SAP.Logon.MobilePlace.UI”
     ...>
    ...
    <mobilePlace:MobilePlaceUI Name=”MobilePlace” />
    ...
  2. You can subscribe to the Mobile Place’s events in the page’s .cs file and get the configuration. For example:
    this.MobilePlace.ReceivedConfiguration += MobilePlaceConfigurationReceived;
    this.MobilePlace.MobilePlaceCancelled += MobilePlaceCancelled;
    	
    private async void MobilePlaceConfigurationReceived(object sender, IapplicationConfiguration configuration) {
    	ushort? port = configuration.Port;
    	string protocol = configuration.Protocol;
    	string host = configuration.Host;
    	
    	foreach (IauthenticationSettings authentication in configuration.Authentication) {
    		ConfigurationType configType = authentication.AuthenticationType;
    			switch (configType) {		
    				case ConfigurationType.Basic: ...
    				case ConfigurationType.Saml2: ...
    				case ConfigurationType.Certificate: ...
    				default: break;
    		}
    	}
    }
    	
    private void MobilePlaceCancelled(object sender, EventArgs e) {
    	...
    }