Support Home > SDK Integration > Xamarin – SDK Integration

Xamarin – SDK Integration


The Kochava Xamarin SDK is a lightweight plugin which can be easily integrated into your Android or iOS project. The entire integration process takes less than five minutes and simply requires adding the SDK within your project and then starting the Kochava Tracker in code. If you have already integrated the SDK and started the tracker, please visit Using the SDK and choose a topic.

Our Xamarin SDK supports all Mono frameworks including MonoGame.
Please use our Windows SDK directly if targeting a windows platform.


Integrating the SDK

Requirements:

  • Android API 14
  • Xcode 11.3.1

 

Supported Platforms:

  • Android
  • iOS

Integration:

Estimated Time to Complete
5 Minutes
  1. Add the SDK.
  2. In order to use the Kochava SDK, first add it within your project. This can be accomplished by downloading the DLLs and then adding them to your project.

     

    Release Notes —

    Latest Release Notes

     

  3. DLL Setup.
  4. After downloading the DLLs for both Android and iOS from the download badge above you can import them into your project as follows where you import the iOS DLL in your iOS project and the Android DLL in your Android project.

    1. Right click the References folder in your project and click Edit References.
    2. Select the .Net Assembly tab and Click Browse.
    3. Locate and select the KochavaXamarin DLL and import it.

     

    Google Play Services —

    The Kochava SDK requires Google Play Services ads-identifier library. To add this to your project include the GooglePlayServices.Ads.Identifier NuGet package.

     

    Google Install Referrer —

    Download the Google Install Referrer Library and add it to your project as an AndroidAarLibrary.

     

    Email Attribution —

    If enabled in the Free App Analytics dashboard for your app, the Kochava SDK can retrieve email addresses on the device, for use in attribution. If you wish to enable this capability, you need to add the GET_ACCOUNTS permission in your Android manifest.


Starting the Tracker

Estimated Time to Complete
1 Minute

Once you have added the Kochava SDK to your project, the next step is to configure and start the Kochava Tracker in code. Only your App GUID is required to start the tracker with the default settings, which is the case for typical integrations.

We recommend starting the tracker as soon as the application starts. This would be in Application.onCreate for Android and in UIApplicationDelegate.FinishedLaunching for iOS, although this can be done elsewhere if needed. Starting the tracker as early as possible will provide more accurate session reporting and help to ensure the tracker has been started before using it. Keep in mind the tracker can only be configured and started once per launch.


Confirm the Integration

 

SDK WAYPOINT: At this point basic integration is complete and the Kochava SDK will begin reporting session activity and attributing installs.

 

Where to Go From Here:

Now that you have completed integration you are ready to utilize the many features offered by the Kochava SDK. Continue on to Using the SDK and choose a topic.


Custom Tracker Configuration

If you would like to make adjustments to the tracker configuration beyond the default settings, set your App GUID and the desired parameters and then pass it to the tracker’s configure method.

 

Using a Custom Configuration:

 

NOTE: Setting values within a configuration object will have no effect after the tracker has been started.

Below is a list of all configuration options and their default settings. Keep in mind that in a typical integration these configuration settings should not be adjusted from their default values.

Default — None

This string should be set to your Free App Analytics App GUID, which can be found in your Edit App page within the Free App Analytics dashboard. This value is always required (unless a Partner Name is set).

Default — Disabled

Provide an attribution event listener if you wish to be notified of attribution results from Kochava servers. This is not necessary unless you wish to parse the attribution results for use within the app.

For complete details and examples, see: Retrieving Attribution

Default — Info

Set this value to the desired Log Level to be used by the SDK for debugging purposes.

For complete details and examples, see: Enabling Logging

Default — False

If you wish to limit ad tracking at the application level, with respect to Free App Analytics conversions, set this value to true. It can also be toggled after starting the tracker.

For complete details and examples, see: App Limit Ad Tracking

Default — None

This is a reserved setting and should not be set unless provided by your Client Success Manager.

Default — None

This is a reserved value and should not be set unless provided by your Client Success Manager.

Default — False
As GDPR compliance can present many challenges during development, Free App Analytics offers a fully managed solution for all your GDPR consent requirements through the use of our Intelligent Consent Management feature. By using this feature the Kochava SDK will handle determining when consent is required for any user while shouldering much of the GDPR burden for you.

NOTE: This is an advanced feature requiring additional setup within your Free App Analytics dashboard and should not be enabled without a full and complete understanding of how to use the Intelligent Consent Management feature.

For complete details and examples, see: Intelligent Consent Management

 
 

Last Modified: Apr 16, 2020 at 11:12 am