Banner
Create a WebView view in your layouts. 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 DP.
<android.webkit.WebView
android:id="@+id/myBanner"
android:layout_width="230dp"
android:layout_height="33.33dp"
/>
<android.webkit.WebView
android:id="@+id/otherBanner"
android:layout_width="250dp"
android:layout_height="36dp"
/>
Instantiate In-App messages using the showInApp method.
var myBanner = FindViewById<Android.Webkit.WebView>(Resource.Id.myBanner);
var otherBanner = FindViewById<Android.Webkit.WebView>(Resource.Id.otherBanner);
var views = new List<Android.Webkit.WebView>();
views.Add(myBanner);
views.Add(otherBanner);
var codes = new List<>();
codes.Add("myBanner_CODE");
codes.Add("otherBanner_CODE");
Indigitall.showInApp(getContext(), codes, views, new ShowInAppCallback() {
@Override
public void onLoad(String inAppCode, WebView webView) {
Log.d("In-App loaded: ", inAppCode);
}
@Override
public void onFail(String inAppCode, WebView webView, String message) {}
@Override
public void didDismissed(String inAppCode, WebView webView) {
super.didDismissed(inAppCode,webView);
Log.d("InApp didDismissed " + inAppCode);
}
});
Pop-up
Create a WebView view in your layouts. 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 DP.
var view = findViewById(R.id.myPopup)
Indigitall.ShowPopUp(view, getContext(), "myPopup_CODE", new ShowInAppCallback() {
@Override
public void onLoad(String inAppCode, WebView webView) {
Log.d("In-App loaded: ", inAppCode);
}
@Override
public void onFail(String inAppCode, WebView webView, String message) {}
});
//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:
Indigitall.ShowPopUp(view, getContext(), "myPopup_CODE", myIcon, false, new ShowInAppCallback() {
@Override
public void onLoad(String inAppCode, WebView webView) {
Log.d("In-App loaded: ", inAppCode);
}
@Override
public void onFail(String inAppCode, WebView webView, String message) {}
});