Clevertap Unity Sdk Android

by CleverTap

Unity plugin for the CleverTap Android SDK

( Crawled 4 months ago )

Unity plugin for the CleverTap Android SDK

  1. Copy Plugin/CleverTapUnityAndroid and Plugin/Plugins/Android (or copy the files in Plugin/Plugins/Android to your existing Plugins/Android directory) into the Assets directory of your Unity Project.

  2. Edit the AndroidManifest.xml file in Plugins/Android to add your Bundle Identifier, GCM Sender ID and Deep Link url scheme (if applicable):

     <manifest xmlns:android="" package="YOUR_BUNDLE_IDENTIFIER" android:versionName="1.0" android:versionCode="1" android:installLocation="preferExternal"> <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
     <permission android:protectionLevel="signature" android:name="YOUR_BUNDLE_IDENTIFIER.permission.C2D_MESSAGE" />
     <uses-permission android:name="YOUR_BUNDLE_IDENTIFIER.permission.C2D_MESSAGE" />
         android:permission="" >
             <action android:name="" />
             <action android:name="" />
             <category android:name="YOUR_BUNDLE_IDENTIFIER" />
     <!-- Deep Links uncomment and replace YOUR_URL_SCHEME, if applicable, or remove if not supporting deep links-->
         <intent-filter android:label="@string/app_name">
         <action android:name="android.intent.action.VIEW" />
         <category android:name="android.intent.category.DEFAULT" />
         <category android:name="android.intent.category.BROWSABLE" />
         <data android:scheme="YOUR_URL_SCHEME" />
  3. Create an empty game object (GameObject -> Create Empty) and rename it CleverTapUnityAndroid. Add Assets/CleverTapUnityAndroid/CleverTapUnity-Scripts/CleverTapAndroid.cs as a component of the CleverTapUnityAndroid GameObject.

  1. Select the game object in the Hierarchy pane and add your CleverTap settings inside the Inspector window. You must include your CleverTap Account ID and CleverTap Account Token from your CleverTap Dashboard -> Settings.

    alt text

  2. See usage examples in example/CleverTapAndroid.cs. For more information check out our documentation.

  3. Build your app or Android project as usual.