Cuelinks SDK - Integration Guide
Cuelinks SDK - Integration Guide
Integration Guide
Version: 1.0.3
The content of this document including design, text, graphic and selection and arrangement thereof, is the property of Parity Cube Pvt Ltd.
The content in this document is copyrighted by Parity Cube Pvt Ltd (© Parity Cube Pvt Ltd 2016, all rights reserved) and the information
described herein may be protected by one or more of Parity Cube’s Intellectual Property registrations or pending applications.. Except as
specifically provided otherwise in writing , no part of this document may be reproduced in any form by any means without prior written
authorization of Parity Cube. All rights not expressly granted herein are reserved. Unauthorized use of any content in this document may
violate copyright, trademark and other applicable laws, including confidentiality obligations and could result in criminal or civil penalties. All
copyright, trademark, and other intellectual property and proprietary rights in this document and in the software, text, graphics, images,
and all other materials originated or used by Parity Cube at document are the exclusive property of Parity Cube and its licensors. Content in
this document is solely for informational purposes ; it is not intended as and does not constitute legal or tax advice. Any use of this
document and the information described herein will be governed by these terms and conditions. By viewing, downloading or otherwise
copying this document, you agree that you have read, understood, and will comply with all the terms and conditions set forth herein.
www.cuelinks.com
INTEGRATION GUIDE FOR CUELINKS SDK
Table of Contents
1. Installation Steps
Step 1
implementation 'com.cuelinks.sdk:link-kit:1.0.3'
Step 2
Step 3
@Override
public void onCreate() {
super.onCreate();
Cuelinks.initialize(this);
}
Step 4
Now you are ready to use the SDK , wherever you want to convert your link you can use the following
in your TextView, default behaviour is if you want to redirect all the links to browser.
android:autoLink="all"
textView.setMovementMethod(CuelinkMovementMethod.getInstance(MainAct
ivity.this));
HtmlText,
textView.setText(CuelinkSpan.affiliateHrefUrlsFromHtml(
textView, MainActivity.this));
2. Additional Settings
Configuring subId in your affiliate links also possible with default and dynamic subId configurations.
You can configure upto 5 comma separated subId in the AndroidManifest
<meta-data android:name="com.cuelinks.subId"
android:value="subId1, subId2, SubId3, subId4, subId5”/>
textView.setMovementMethod(CuelinkMovementMethod.getInstance(MainAct
ivity.this, subId1,subId2, SubId3, subId4, subId5));
textView.setText(CuelinkSpan.affiliateHrefUrlsFromHtml( HtmlText,
textView, MainActivity.this,subId1,subId2,SubId3,subId4,subId5));
Configure the base URL of your internal deeplink URL so that the SDK doesn’t affiliate those URLs.
You can configure the internalUrl (optional) for in the AndroidManifest
<meta-data android:name="com.cuelinks.internalUrl"
android:value="example.com”/>
Implement interface CuelinkListener and override method openUrl in it, as per your
requirements.
Note: Here the url will be affiliated already unless configured as internalUrl in Android Manifest file.
@Override
public void openUrl(String url, Context context) {
Your code goes here..
}
textView.setMovementMethod(CuelinkMovementMethod.getInstance(MainAct
ivity.this, (CuelinkListener)MainActivity.this));
textView.setText(CuelinkSpan.affiliateHrefUrlsFromHtml( HtmlText,
textView, MainActivity.this, (CuelinkListener)MainActivity.this));
3. Demo Project
For a better understanding of the installation and working of Cuelinks SDK, you can refer the demo
project mentioned below: