Integration

If you want to integrate the In-App messages in your application, you can do it with several complementary formats:

  • Banner. Static content that is always visible, but allows the user to continue using the application.
  • Popup. Full screen content that forces the user to click or discard the information.

Banner format

Below we tell you how to instantiate one or more In-App messages in banner format.

Remember that you should first have them defined in the indigitall console. See our user manual for more info.

Define a hybridWeview in the .xml file. The size must match what you have defined in the indigitall console ( Tools> In-App / In-Web Schemas ). Remember to translate the units from PX to _inches.

//160 units is 1 inch. 64 units is 1 cm
<local:HybridWebView x:Name="hybridWebView" InAppId="Billboard"  WidthRequest="x" HeightRequest="y"/>

Instantiate In-App messages using the ShowInApp method.

Com.Indigitall.Maui.MInAppConfiguration config = new Com.Indigitall.Maui.MInAppConfiguration();
config.AppKey = "YOUR_APPKEY";

indigitall.ShowInApp(config, webViewHybrid, "INAPP_CODE", (inAppId, webview) =>
  {
    //DO SOMETHING
  },(inAppId, webview, errorMessage)=>
  {
    //LOG ERROR
  }, (inAppCode, webView) =>
  {
    //DidDismissed
  });

Popup format

Next we tell you how to instantiate an In-App message in popup format.
Remember that you should first have it defined in the indigitall console.

Instantiate the In-App messages from the hybridWebView using the ShowPopUp method.

If you want to close popup when it is clicked, you have to add on InApp configuration object, setClosePopupWhenClicked boolean param.

indigitall.ShowPopUp(appKey, view, "INAPP_CODE");

  //In the event that you want to customize the close icon of the Popup,
  //you can use the following method, in which you add a custom UIButton, or use the ** closeIconDisabled ** variable to show none:
Com.Indigitall.Maui.MInAppConfiguration config = new Com.Indigitall.Maui.MInAppConfiguration();
config.AppKey = "YOUR_APPKEY";
config.ClosePopupWhenClicked = true;


indigitall.ShowPopUp(config, view, "INAPP_CODE", myIcon, false, (inAppId, webview) =>
    {
    //DO SOMETHING
    },(inAppId, webview, errorMessage)=>
    {
    //LOG ERROR
    }, (message, inapp, seconds) =>
    {
        Console.WriteLine("On Show time finished");
    }, () =>
    {
        Console.WriteLine("DidClick");
    }, () =>
    {
        Console.WriteLine("DidClose");
    }, (inApp, code, message) =>
    {
        Console.WriteLine("DidExpired");
    }, (inApp, code, message) =>
    {
        Console.WriteLine("Did clickOut");
    }, (inApp, code, message) =>
    {
        Console.WriteLine("Did Show many times");
    }, (inApp, code, message) =>
    {
        Console.WriteLine("DidDismissed");
    });