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
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
98
Other Decks in Technology
See All in Technology
「Blue Team Labs Online」入門 - みんなで挑むログ解析バトル
v_avenger
0
150
マネージャー版 "提案のレベル" を上げる
konifar
22
15k
8万デプロイ
iwamot
PRO
2
230
類似画像検索モデルの開発ノウハウ
lycorptech_jp
PRO
5
1.1k
IBM Bobを使って、PostgreSQLのToDoアプリをDb2へ変換してみよう/202603_Dojo_Bob
mayumihirano
1
300
僕、S3 シンプルって名前だけど全然シンプルじゃありません よろしくお願いします
yama3133
1
190
us-east-1 に障害が起きた時に、 ap-northeast-1 にどんな影響があるか 説明できるようになろう!
miu_crescent
PRO
13
4.2k
親子 or ペアで Mashup for the Future! しゃべって楽しむ 初手AI駆動でものづくり体験
hiroramos4
PRO
0
100
決済サービスを支えるElastic Cloud - Elastic Cloudの導入と推進、決済サービスのObservability
suzukij
2
590
[JAWS DAYS 2026]私の AWS DevOps Agent 推しポイント
furuton
0
140
Claude Codeが爆速進化してプラグイン追従がつらいので半自動化した話 ver.2
rfdnxbro
0
490
EMからVPoEを経てCTOへ:マネジメントキャリアパスにおける葛藤と成長
kakehashi
PRO
9
1.6k
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
190
Context Engineering - Making Every Token Count
addyosmani
9
740
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
200
Embracing the Ebb and Flow
colly
88
5k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Faster Mobile Websites
deanohume
310
31k
How to make the Groovebox
asonas
2
2k
Producing Creativity
orderedlist
PRO
348
40k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
82
Documentation Writing (for coders)
carmenintech
77
5.3k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
190
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
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