Xamarin Android

SDK Installation

Note: Ensure that you complete both the steps in order to create and test the in-app experience in your integrated build.

Step 1. Integrate Leap SDK

1.a Add Leap Xamarin SDK dependency

Download leap_xamarin_android_aui package and add it to the References in your Android specific project
Android
iOS
1
Copied!

1.b Start Leap SDK

Android
iOS
1
using IS.Leap.Android.Aui;
2
3
namespace YourApp
4
{
5
[Activity(Label = "@string/app_name", Theme = "@style/AppTheme.NoActionBar", MainLauncher = true)]
6
public class MainActivity : AppCompatActivity
7
{
8
protected override void OnCreate(Bundle savedInstanceState)
9
{
10
base.OnCreate(savedInstanceState);
11
12
Leap.Start("API_KEY");
13
}
14
}
15
}
Copied!
1
2
Copied!

Step 2. Enable 'Creator mode' in your app

To create in-app experiences in the Leap Studio, you will need to enable the 'Creator mode' in your app. This can be done by integrating the Leap Creator SDK.
2.a Add Dependencies
Note - The Leap Creator SDK must be removed before going live to PlayStore
Download leap_xamarin_android_creator package and add it to the References in your Android specific project
Android
iOS
1
Copied!
2.b Start Leap Creator SDK
Android
iOS
1
using IS.Leap.Android.Creator;
2
3
namespace YourApp
4
{
5
[Activity(Label = "@string/app_name", Theme = "@style/AppTheme.NoActionBar", MainLauncher = true)]
6
public class MainActivity : AppCompatActivity
7
{
8
protected override void OnCreate(Bundle savedInstanceState)
9
{
10
base.OnCreate(savedInstanceState);
11
12
LeapCreator.Start("API_KEY");
13
14
}
15
}
16
}
Copied!
1
2
Copied!
Leap Xamarin Creator library has 2 package dependencies which needs to be added to the packages of your project. They are
  1. 1.
    Xamarin.GooglePlayServices.Vision
  2. 2.
    XamarinLibrary.Xamarin.Android.Squareup.Okio.Okio

Copy link