Download Xamarin Android SDK


You can contact us on support@tagnpin.com if any assistance is required.
SDK source can be downloaded from here.

Download Xamarin Android SDK

1. Integrate the sdk



2. Configure your AndroidManifest.xml

Select All


<manifest....>
    <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"/>      <aplication....>
<activity android:name=".CampaignLogin"></activity>
<activity android:name=".ShareScreen"></activity>
<receiver
            android:name="com.invitereferrals.invitereferrals.InviteReferrerBroadcastReceiver"
            android:exported="true"
            android:enabled="true">
            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER" />
            </intent-filter>
</receiver>
<meta-data android:name="invitereferrals_bid" android:value="52X"></meta-data>
<meta-data android:name="invitereferrals_bid_e" android:value="6F969A60F73C2218B6913465A5194CFC" ></meta-data>
</application></manifest>


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:

Select All


<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:


Select All

InviteReferralsApplication.Register(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.

Select All

  
InviteReferralsApi.GetInstance(this).Inline_btn((int)CampaignID);
 

Example:

Select All

 

        InviteReferralsApi.GetInstance(this).Inline_btn(1765);
      For Default Campaign you can pass 0 as CampaignID: 
       InviteReferralsApi.GetInstance(this).Inline_btn(0);

5. Show Refer a friend Popup

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

Select All



InviteReferralsApi.GetInstance(this).Invite((String)CUSTOM_RULE);

InviteReferralsApi.GetInstance(this).Invite("home");   

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)

Select All

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

Example:

Select All

 
    InviteReferralsApi.GetInstance(this).UserDetails('Tom', 'tom@gmail.com', '9812546723', 0, null, null);
     


7. Track Install / Register / Sale Events

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

Install

Select All

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

Register

Select All

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

Sale

Select All

    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.

Select All

   
InviteReferralsApi.GetInstance(this).ShowWelcomeMessage();