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
94
Other Decks in Technology
See All in Technology
Yamla: Rustでつくるリアルタイム性を追求した機械学習基盤 / Yamla: A Rust-Based Machine Learning Platform Pursuing Real-Time Capabilities
lycorptech_jp
PRO
4
170
AI導入の理想と現実~コストと浸透〜
oprstchn
0
140
整頓のジレンマとの戦い〜Tidy First?で振り返る事業とキャリアの歩み〜/Fighting the tidiness dilemma〜Business and Career Milestones Reflected on in Tidy First?〜
bitkey
0
160
論文紹介:LLMDet (CVPR2025 Highlight)
tattaka
0
190
Tokyo_reInforce_2025_recap_iam_access_analyzer
hiashisan
0
130
低レイヤを知りたいPHPerのためのCコンパイラ作成入門 完全版 / Building a C Compiler for PHPers Who Want to Dive into Low-Level Programming - Expanded
tomzoh
4
3.4k
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
3
930
AIの最新技術&テーマをつまんで紹介&フリートークするシリーズ #1 量子機械学習の入門
tkhresk
0
140
Understanding_Thread_Tuning_for_Inference_Servers_of_Deep_Models.pdf
lycorptech_jp
PRO
0
150
PHPでWebブラウザのレンダリングエンジンを実装する
dip_tech
PRO
0
210
2025-06-26_Lightning_Talk_for_Lightning_Talks
_hashimo2
2
110
ドメイン特化なCLIPモデルとデータセットの紹介
tattaka
1
300
Featured
See All Featured
Designing for Performance
lara
609
69k
A Modern Web Designer's Workflow
chriscoyier
694
190k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
720
Making Projects Easy
brettharned
116
6.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
GitHub's CSS Performance
jonrohan
1031
460k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
It's Worth the Effort
3n
185
28k
Why Our Code Smells
bkeepers
PRO
337
57k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.9k
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