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
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DroidCon India - Coding With Your Hands Tied
Darshan Pania
November 03, 2019
More Decks by Darshan Pania
See All by Darshan Pania
Coding With Your Hands Tied
darshanpania
0
100
Other Decks in Technology
See All in Technology
DINO-EdgeQuery:Edge-First Polygon Decoding for Building Footprint Extraction from Satellite Imagery
lehupa
0
140
[RSJ26] AnoleVLA: Lightweight Vision-Language-Action Model with Deep State Space Models for Mobile Manipulation
keio_smilab
PRO
0
120
Genie Code ワークショップ 基礎編 / Genie-Code-Workshop-fundamental
databricksjapan
PRO
0
350
Beyond the Hype: Practical AI for Your Oracle Database with MCP
thatjeffsmith
1
260
AI時代に、プロダクトの数だけ積み上がる所有コストをどうエンジニアリングするか / Engineering the Cost of Ownership
kzkmaeda
0
1k
Webとヘルスデータ
yukukotani
0
180
DMMブックスのNext.js化を加速させるAI活用 / Migrating DMM Books to Next.js with AI
kentarom
1
330
こんなアーキテクチャ図は嫌だ BEYOND THE TIME: 半年後の自分へ贈る15のメッセージ / 15 of Anti-pattern in AWS Architecture Diagrams
naospon
3
230
Bet AI Day 2026丨Production-Ready AI Agents — エンタープライズの実務を任せるための設計と運用
layerx
PRO
3
2.1k
AIエージェントの開発・提供におけるセキュリティリスクの論点と対策
flatt_security
1
570
Bet AI Day 2026丨AIを「使う」から、AIが「働く」へ ― LayerXが進める「組織AI」の社会実装
layerx
PRO
3
2.2k
Hub & Spoke 環境のネットワークルーティングを分解してみる
tsuyataku
1
530
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
680
Typedesign – Prime Four
hannesfritz
42
3.2k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
810
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Test your architecture with Archunit
thirion
2
2.4k
KATA
mclloyd
PRO
35
15k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
YesSQL, Process and Tooling at Scale
rocio
174
15k
A Modern Web Designer's Workflow
chriscoyier
698
190k
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