Xamarin SDK

Integration for Xamarin Android SDK

Download Xamarin Android SDK


You can contact us on [email protected] if any assistance is required.

SDK source can be downloaded from here.

1. Integrate the SDK

1.1 - Extract the invitereferrals.zip file ,open invitereferrals/dll folder copyInvitereferrals.dll add it as a reference to your app.

1.2 - Copy invitereferrals/assets/fonts.ttf file into YourApplication/Assets folder.

1.3 - Copy all icons from invitereferrals/drawables folder into YourApplication/Resources/drawables folder.

1.4 - Copy all icons from invitereferrals/anim folder into YourApplication/Resources/anim folder.

1.5 - Copy invitereferrals/values/Strings.xml file into YourApplication/Resources/values folder.

1.6 - If your app doesn't have android.support.v4 reference, then add reference for android.support.v4 to it.

2. Configure your AndroidManifest.xmlx

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>      
    <activity android:name=".CampaignLogin"></activity>
    <activity android:name=".ShareScreen"></activity>
    <action android:name="com.android.vending.INSTALL_REFERRER" />
    <meta-data android:name="invitereferrals_bid" android:value="29XX8"></meta-data>
    <meta-data android:name="invitereferrals_bid_e" 
    android:value="DD85448BF2XXXX482D5F8C28425AAC6F" ></meta-data>

3. Initializing the sdk

a) If you don’t have your own application class, then in the manifest file register our application class like this in application tag:

<aplication android:name="com.invitereferrals.invitereferrals.InviteReferralsApplication"></application>

b) If you have your own application class then inside your application class onCreate method, call our register method like this:


4. Add Referral Button

Add the following line in your custom button click. Replace CampaignID with the id of the referral campaign. Default campaignID will be applied if no campaignID specified.



For Default Campaign you can pass 0 as CampaignID: 

5. Show Refer a friend Popup

Just add the following line in the activity in which you want to show the referral program popup.



You may then set rules in the inviteReferrals campaign settings to show campaign popup after specific time delay or after specific number of App launches on this view.

6. Pass User Details for Auto-Login (Single Sign In)

InviteReferralsApi.GetInstance(this).UserDetails((String)name, (String)email, (String)mobile, 0, (String)subscriptionID, (String)customValues);


InviteReferralsApi.GetInstance(this).UserDetails('Tom', '[email protected]', '9812546723', 0, null, null);

7. Track Install / Register / Sale Events

This is how you call tracking() method to track:


InviteReferralsApi.GetInstance(this).Tracking("install", null, 0);


InviteReferralsApi.GetInstance(this).Tracking("register", (String)EMAIL_ID, 0);


InviteReferralsApi.GetInstance(this).Tracking("sale", (String)ORDER_ID, (int)PURCHASE_VALUE);

8. Show Welcome Message

Show welcome message to the customer if he comes through the referral of his friend.