Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
DroidCon India - Coding With Your Hands Tied
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Darshan Pania
November 03, 2019
Technology
0
110
DroidCon India - Coding With Your Hands Tied
Darshan Pania
November 03, 2019
Tweet
Share
More Decks by Darshan Pania
See All by Darshan Pania
Coding With Your Hands Tied
darshanpania
0
96
Other Decks in Technology
See All in Technology
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
200
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
68k
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
2.5k
Amazon Bedrock Knowledge Basesチャンキング解説!
aoinoguchi
0
150
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
260
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
480
20260204_Midosuji_Tech
takuyay0ne
1
160
コスト削減から「セキュリティと利便性」を担うプラットフォームへ
sansantech
PRO
3
1.5k
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
170
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
380
Red Hat OpenStack Services on OpenShift
tamemiya
0
120
SRE Enabling戦記 - 急成長する組織にSREを浸透させる戦いの歴史
markie1009
0
130
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
240
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
170
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
210
Facilitating Awesome Meetings
lara
57
6.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Evolving SEO for Evolving Search Engines
ryanjones
0
130
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
310
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
62
Transcript
Coding With Your Hands Tied - A session on Android
Library development
Introduction
About Me Darshan Pania Lead Android SDK Developer CleverTap https:/
/github.com/CleverTap/clev ertap-android-sdk Twitter - @i_m_Pania
Helping marketing, product and growth teams at B2C companies retain
their users for life. We enable this at scale, in real-time and with precision by providing a unique combination of: 1. A unified user data platform 2. Actionable insights and segmentation 3. Timely, personalized omni-channel engagement What does do?
What to expect from this session? • Interactive
What to expect from this session? • Interactive • Informative
What to expect from this session? • Interactive • Informative
• Educative
None
None
Apps vs Libraries App Library What is the difference?
Dependencies used by Apps • Networking ◦ Volley ◦ Retrofit
• Image/GIFs ◦ Glide ◦ Picasso • Video ◦ ExoPlayer • Databases ◦ Room ◦ Realm ◦ greenDAO • Dependency Injection ◦ Dagger ◦ ButterKnife • UI Components ◦ Constraint Layout
This is how an App’s build.gradle file looks like -
Dependencies used by Libraries • Networking ◦ None • Image/GIFs
◦ None • Video ◦ None • Databases ◦ None • Dependency Injection ◦ None • UI Components ◦ None
Dependencies used by CleverTap SDK • Networking ◦ None •
Image/GIFs ◦ Glide • Video ◦ ExoPlayer • Databases ◦ None • Dependency Injection ◦ None • UI Components ◦ None
This is how CleverTap SDK’s build.gradle file looks like -
Solutions for Libraries
How do Libraries handle Networking? • HTTPS Connection • A
custom queueing mechanism
Setting up HTTPS connections
Setting up a queueing mechanism
How do Libraries handle Images/GIFs/Videos? • LRUCache • ExoPlayer is
the best!
Initializing a LRUCache
Adding a Bitmap or GIF byte array data to the
LRUCache
Using ExoPlayer to stream videos
Part I - Prepare the media to be shown
Part II - Play the media
How do Libraries handle Databases? • SQLite
Creating Tables, handling Database initialization and Database upgrade
How do Libraries handle Dependency Injection? • Good old findViewById
A simple XML Layout
Handling UI views in code
How do Libraries handle UI layouts? • Legacy is the
only way for us...
XML Layout for our Inbox Activity
What can we do better?
How to publish Libraries? • Setup Bintray account • Setup
your build.gradle • Package and Publish
Setup a Bintray Account
Bintray is your friend!
Add a New Repository!
Give your repository a name, select “Maven” as a type
Setup your build.gradle
Add your Bintray username and API key to local.properties In
the build.gradle of your library module
implementation ‘com.darshan.logg:logg:1.0’
At the end of your build.gradle file, you need to
add this
None
Package and Publish
Now run two Gradle commands on your Terminal/Android Studio
Add your library to JCenter
None
Q&A
That’s all folks! Darshan Pania, CleverTap @i_m_Pania